This is an automated email from the git hooks/post-receive script.

kanashiro-guest pushed a commit to branch master
in repository carton.

commit d1c839c298189bfeee3217df94e5051e05273f5c
Author: Tatsuhiko Miyagawa <miyag...@bulknews.net>
Date:   Sun Aug 4 22:02:08 2013 -0700

    Display usage when passed unsupported command
---
 lib/Carton/CLI.pm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/Carton/CLI.pm b/lib/Carton/CLI.pm
index 6748cba..edc0765 100644
--- a/lib/Carton/CLI.pm
+++ b/lib/Carton/CLI.pm
@@ -52,7 +52,7 @@ sub run {
 
     my $code = try {
         my $call = $self->can("cmd_$cmd")
-          or Carton::Error::CommandNotFound->throw(error => "Could not find 
command '$cmd'");
+            or Carton::Error::CommandNotFound->throw(error => "Could not find 
command '$cmd'");
         $self->$call(@commands);
         return 0;
     } catch {
@@ -60,6 +60,10 @@ sub run {
 
         if ($_->isa('Carton::Error::CommandExit')) {
             return $_->code || 255;
+        } elsif ($_->isa('Carton::Error::CommandNotFound')) {
+            warn $_->error, "\n\n";
+            $self->cmd_usage;
+            return 255;
         } elsif ($_->isa('Carton::Error')) {
             warn $_->error, "\n";
             return 255;

-- 
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

Reply via email to