This is an automated email from the git hooks/post-receive script. kanashiro-guest pushed a commit to branch master in repository carton.
commit c1185b5256c04e023a28ed04111515505d016a2b Author: Tatsuhiko Miyagawa <miyag...@bulknews.net> Date: Sat Jun 1 16:34:11 2013 +0900 exec should not be run without carton.lock Fix #91 --- lib/Carton/CLI.pm | 3 +++ xt/cli/exec.t | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/lib/Carton/CLI.pm b/lib/Carton/CLI.pm index 6f4a62c..6642719 100644 --- a/lib/Carton/CLI.pm +++ b/lib/Carton/CLI.pm @@ -235,6 +235,9 @@ EOF sub cmd_exec { my($self, @args) = @_; + my $lock = $self->find_lock + or $self->error("Can't find carton.lock: Run `carton install` to build the lock file.\n"); + # allows -Ilib @args = map { /^(-[I])(.+)/ ? ($1,$2) : $_ } @args; diff --git a/xt/cli/exec.t b/xt/cli/exec.t index 44d6243..17d2bd5 100644 --- a/xt/cli/exec.t +++ b/xt/cli/exec.t @@ -4,6 +4,14 @@ use xt::CLI; { my $app = cli(); + $app->run("exec", "perl", "-e", 1); + like $app->output, qr/carton\.lock/; +} + +{ + my $app = cli(); + $app->dir->touch("cpanfile", ''); + $app->run("install"); $app->run("exec", "--", "perl", "-e", "use Try::Tiny"); like $app->system_error, qr/Can't locate Try\/Tiny.pm/; -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/carton.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits