summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;