New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
6807 add exit codes to setup session.rb #160
Conversation
Integration
Integration
Integration
Integration
exit_code = $?.exitstatus | ||
raise "failed command: #{shell}" unless exit_code==0 | ||
|
||
rescue Exception => error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your raise is caught with rescue and is not really thrown. Is it supposed to be so? Application will not return 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It supposed for this, because it is working in cycle, and maybe will be some exceptions at setup, which will not be reason to exit from cycle.
|
||
puts "#{shellCommand}\n" | ||
# just one soft exeption - box already exist | ||
if shellCommand[/attempting to add already exists/]==nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check if $? != 0
Raise if don't exist directory\files and rescue shell - errors.
P.S. File exists maybe not work.