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

Problems with ensuring proper version to be passed as parameter. #149

Closed
marcinbojko opened this issue Jan 31, 2017 · 12 comments
Closed

Problems with ensuring proper version to be passed as parameter. #149

marcinbojko opened this issue Jan 31, 2017 · 12 comments

Comments

@marcinbojko
Copy link

When using ensure in form:

package:
  ensure: 1.1.1

Chocolatey calls for:

C:\ProgramData\chocolatey\bin\choco.exe upgrade package -version 1.1.1 -y

which gives us:

Error: Could not update: Execution of 'C:\ProgramData\chocolatey\bin\choco.exe upgrade package -version 1.1.1 -y ' returned 3010: Plted in error (converted to warning):
Cannot bundle unregistered option '-e'.

and on every run gives notify:

Notice: /Stage[main]/Win_manage/Package[package]/ensure: ensure changed '1.1.1' to ' 1.1.1'
When using manually:

C:\ProgramData\chocolatey\bin\choco.exe upgrade package --version 1.1.1 -y

Package passes properly.

The problem is with -version instead of --version

Chocolatey in 0.10.3 version.

@ferventcoder
Copy link
Contributor

Are you using chocolatey/chocolatey or puppetlabs/chocolatey?

The actually error is 3010 - which means you need to pass --ignore-package-exit-codes in the install_options. Or if you use puppetlabs/chocolatey, that is already handled for you.

@marcinbojko
Copy link
Author

Thanks @ferventcoder , so another argument for switching to puppetlabs/chocolatey.

@ferventcoder
Copy link
Contributor

For now at least. 👍

@ferventcoder
Copy link
Contributor

The ultimate plan is to have this one on the edge of new features, etc, but right now it is in need of playing catch up with the work that has went into the puppetlabs/chocolatey version.

@ferventcoder
Copy link
Contributor

Let me know if it still has the secondary issue once you've flipped. Oh by the way, it is a drop in replacement. You won't need to change anything else.

@marcinbojko
Copy link
Author

If switching to puppetlabs/chocolatey will do - I'll do if. If not, I'll add "--ignore-package-exit-codes" as resource defaults to never, ever, ever remember of it.

@ferventcoder
Copy link
Contributor

@marcinbojko other handy things in the puppetlabs/chocolatey module:

  • chocolateysource
  • chocolateyconfig
  • chocolateyfeature

@marcinbojko
Copy link
Author

Yup. But I wrote this part earlier, for myself, using chocolatey/chocolatey. And it works. And changing a lots of hosts is a pain. And so on ;)

@ferventcoder
Copy link
Contributor

Fair, I would have assumed you would update your master and let it sync down the changes for you automatically.

@ferventcoder
Copy link
Contributor

No worries, glad we had options to move you forward without a switch over.

@marcinbojko
Copy link
Author

That part is yet to be determined. Testing now.

@marcinbojko
Copy link
Author

marcinbojko commented Jan 31, 2017

As usuall @ferventcoder - what would I do without you and Chocolatey? ;)

Debug: Executing: 'C:\ProgramData\chocolatey\bin\choco.exe upgrade powershell -version 5.1.14409.1005 -y --ignore-package-exit-codes'
Notice: /Stage[main]/Win_manage/Package[powershell]/ensure: ensure changed '5.0.10586.20161216' to '5.1.14409.1005'

DavidS pushed a commit to DavidS/puppetlabs-chocolatey that referenced this issue Nov 15, 2019
(WIN-280) add skip() unless pattern to tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants