summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuhiko Miyagawa <miyagawa@bulknews.net>2015-04-27 16:01:48 -0700
committerTatsuhiko Miyagawa <miyagawa@bulknews.net>2015-04-27 16:01:48 -0700
commitdd5dc6d2ce09628a3ee29b3fccc7a30f66123cb8 (patch)
tree762900fecbd36d9d6b97c7b250319dc513b13a32
parentc6407cd1268ffec4ad76a5a5aa4e131999a47fbe (diff)
downloadcarton-dd5dc6d2ce09628a3ee29b3fccc7a30f66123cb8.tar.gz
exit 127 if the command is not found. #193
-rw-r--r--lib/Carton/CLI.pm8
1 files 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;