From dd5dc6d2ce09628a3ee29b3fccc7a30f66123cb8 Mon Sep 17 00:00:00 2001 From: Tatsuhiko Miyagawa Date: Mon, 27 Apr 2015 16:01:48 -0700 Subject: exit 127 if the command is not found. #193 --- lib/Carton/CLI.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Carton/CLI.pm b/lib/Carton/CLI.pm index aa4dcf5..cea48ab 100644 --- a/lib/Carton/CLI.pm +++ b/lib/Carton/CLI.pm @@ -387,8 +387,12 @@ sub cmd_exec { local $ENV{PERL5LIB} = "$path/lib/perl5"; local $ENV{PATH} = "$path/bin:$ENV{PATH}"; - use warnings FATAL => 'all'; - $UseSystem ? system(@args) : exec(@args); + if ($UseSystem) { + system @args; + } else { + exec @args; + exit 127; # command not found + } } 1; -- cgit v1.2.1