Skip to content
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

(MODULES-3880) Ignore Package Exit Codes #46

Merged
merged 3 commits into from
Sep 21, 2016

Conversation

ferventcoder
Copy link

This might need a ticket @jpogran / @puppetlabs/windows

A few maintenance fixes that I've been wanting to do prior to the release, the bigger of which is to add the ignore package exit codes.

In Chocolatey v0.9.10, choco started allowing uninstall with a source
agument again. This is necessary for alternative sources - otherwise
choco doesn't know how to remove "packages" from those sources and
instead looks for packages by that name.
When working with 0.9.10 or greater, pass the switch to ignore exit
codes. When a user is also passing the same switch, Chocolatey will
ignore the duplication.
@ferventcoder ferventcoder changed the title (maint) Ignore Package Exit Codes (MODULES-3880) Ignore Package Exit Codes Sep 20, 2016
@ferventcoder
Copy link
Author

This passed adhoc testing.

if @resource[:source]
args << '-source' << @resource[:source]
end

args << @resource[:install_options]

if Gem::Version.new(PuppetX::Chocolatey::ChocolateyCommon.choco_version) >= Gem::Version.new(PuppetX::Chocolatey::ChocolateyCommon::MINIMUM_SUPPORTED_CHOCO_VERSION_EXIT_CODES)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: can these be made variables? Super long line makes its hard to read the important part

if @resource[:source]
args << '-source' << @resource[:source]
end
end

args << @resource[:uninstall_options]

if Gem::Version.new(PuppetX::Chocolatey::ChocolateyCommon.choco_version) >= Gem::Version.new(PuppetX::Chocolatey::ChocolateyCommon::MINIMUM_SUPPORTED_CHOCO_VERSION_EXIT_CODES)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Super long line and readability

@jpogran
Copy link

jpogran commented Sep 21, 2016

👍 Can ignore my nit comments if you want

@jpogran jpogran merged commit 9edd190 into puppetlabs:master Sep 21, 2016
@ferventcoder ferventcoder deleted the exitcodes branch September 21, 2016 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants