Check return system value for gitlab test rake tasks
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
7ad5fb53ac
commit
e426d43924
3 changed files with 6 additions and 7 deletions
|
@ -8,9 +8,8 @@ namespace :gitlab do
|
|||
]
|
||||
|
||||
cmds.each do |cmd|
|
||||
result = system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd)
|
||||
|
||||
raise "#{cmd} failed!" unless result
|
||||
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) ||
|
||||
raise "#{cmd} failed!"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -40,7 +40,7 @@ end
|
|||
|
||||
def run_commands(cmds)
|
||||
cmds.each do |cmd|
|
||||
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd)
|
||||
raise "#{cmd} failed!" unless $?.exitstatus.zero?
|
||||
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) ||
|
||||
raise "#{cmd} failed!"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -8,7 +8,7 @@ task :spinach do
|
|||
]
|
||||
|
||||
cmds.each do |cmd|
|
||||
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd)
|
||||
raise "#{cmd} failed!" unless $?.exitstatus.zero?
|
||||
system({'RAILS_ENV' => 'test', 'force' => 'yes'}, *cmd) ||
|
||||
raise "#{cmd} failed!"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue