Skip to content

Commit 874cfed

Browse files
authored
Merge pull request #37 from DannyBen/exit-code-fix
Fix invalid exit code in certain situations
2 parents ff5f925 + d7d82de commit 874cfed

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/runfile/runner.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def run(*argv)
8585
docopt_exec argv
8686
rescue Docopt::Exit => ex
8787
puts ex.message
88-
exit 1
88+
exit 2
8989
end
9090
end
9191

@@ -144,11 +144,12 @@ def handle_no_runfile(argv)
144144
maker = RunfileHelper.new
145145
maker.purge_settings if @ignore_settings
146146
runfile = maker.handle argv
147-
if runfile
148-
@superspace = argv[0]
149-
execute argv, runfile
150-
end
151-
exit 1
147+
148+
exit 3 unless runfile
149+
150+
@superspace = argv[0]
151+
execute argv, runfile
152+
exit
152153
end
153154

154155
def expand_shortcuts(argv)

0 commit comments

Comments
 (0)