Merge pull request #3056 from tgxworld/exit_on_non_zero_status_code
Exit if a non zero status code is returned.
This commit is contained in:
commit
594ded1805
|
@ -42,11 +42,14 @@ end
|
||||||
opts.parse!
|
opts.parse!
|
||||||
|
|
||||||
def run(command, opt = nil)
|
def run(command, opt = nil)
|
||||||
if opt == :quiet
|
exit_status =
|
||||||
system(command, out: "/dev/null", err: :out)
|
if opt == :quiet
|
||||||
else
|
system(command, out: "/dev/null", err: :out)
|
||||||
system(command, out: $stdout, err: :out)
|
else
|
||||||
end
|
system(command, out: $stdout, err: :out)
|
||||||
|
end
|
||||||
|
|
||||||
|
exit unless exit_status
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -82,7 +85,7 @@ sudo apt-get install redis-server
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "Running bundle"
|
puts "Running bundle"
|
||||||
if !run("bundle", :quiet)
|
if run("bundle", :quiet)
|
||||||
puts "Quitting, some of the gems did not install"
|
puts "Quitting, some of the gems did not install"
|
||||||
prereqs
|
prereqs
|
||||||
exit
|
exit
|
||||||
|
|
Loading…
Reference in New Issue