-
Notifications
You must be signed in to change notification settings - Fork 30
Ensure yum update raises on argument errors even with exit code 0 #106
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
Ensure yum update raises on argument errors even with exit code 0 #106
Conversation
15b3c02
to
cb337ea
Compare
lib/linux_admin/yum.rb
Outdated
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.
This begs for a comment or something.
Does it make sense to use run
and instead to make it obvious that yum in some cases is exiting 0 on errors:
raise ... if (out.exit_status != 0) || (out.exit_status == 0 && out.error.include?("No Match for argument"))
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.
Forget if it's exit_code or exit_status....
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.
I'd rather get yum fixed and have it exit 1 and let run!
handle it. I'll open a bug on yum and make a comment with the BZ id.
Good find. Just had a few small nitpicks. |
cb337ea
to
a18b3e6
Compare
Checked commit bdunne@a18b3e6 with rubocop 0.21.0 spec/yum_spec.rb
|
@jrafanie updated based on your comments |
@brandondunne Looks good to me, merge at will when green. |
…_error Ensure yum update raises on argument errors even with exit code 0
https://bugzilla.redhat.com/show_bug.cgi?id=1136941