Skip Menu |

This queue is for tickets about the Dist-Zilla-Plugin-Git CPAN distribution.

Report information
The Basics
Id: 93057
Status: resolved
Priority: 0/
Queue: Dist-Zilla-Plugin-Git

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.020
Fixed in: 2.022



path() requires a defined, positive-length argument at /Users/ether/.perlbrew/libs/19.8@std/lib/perl5/Dist/Zilla/Plugin/Git/Commit.pm line 79. in version 2.020 during release; some files that should have been added (generated for the first time, in the root of the repository) were not added and this exception was thrown. (configuration is in Dist::Zilla::PluginBundle::Author::ETHER)
This is caused by add_files_in => [''] in your Git::Commit config in your plugin bundle.
Subject: Re: [rt.cpan.org #93057]
Date: Sun, 16 Feb 2014 09:02:05 -0800
To: "Christopher J. Madsen via RT" <bug-Dist-Zilla-Plugin-Git [...] rt.cpan.org>
From: Karen Etheridge <ether [...] cpan.org>
On Sun, Feb 16, 2014 at 04:23:52AM -0500, Christopher J. Madsen via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=93057 > > > This is caused by add_files_in => [''] in your Git::Commit config in your plugin bundle.
There is no other way that I can see to refer to the root directory.
On 2014-02-16 09:02:16, ETHER wrote: Show quoted text
> On Sun, Feb 16, 2014 at 04:23:52AM -0500, Christopher J. Madsen via RT > wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=93057 > > > > > This is caused by add_files_in => [''] in your Git::Commit config in > > your plugin bundle.
> > There is no other way that I can see to refer to the root directory.
The ArrayRef[Str] type constraint for add_files_in should be ArrayRef[Path], which would catch this config issue at construction time, rather than in the middle of a release. Now that Path::Tiny is being used, add_files_in => ['.'] will work -- Path::Class didn't like this at all.
As of v2.022, this will fail at startup instead of during the commit. "add_files_in = ." is the correct way to specify the current directory. You should also use ":version = 2.020" to ensure you're using the Path::Tiny version of Git::Commit.