-
Notifications
You must be signed in to change notification settings - Fork 163
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
win_psmodule error: A parameter cannot be found that matches parameter name 'AcceptLicense' in 1.11.0 #424
Comments
What's the version of cc @briantist considering how crappy the UX is to upgrade PowerShellGet and PackageManagement through PowerShell and that we are meant to run on Windows PowerShell out of the box, is it possible to put the license feature behind a feature check? |
re: feature check: I suppose we could do something like I suspect that the issue is that I perhaps incorrectly added the parameter to the internal function that installs the pre-requisites: So probably on this fresh host, it's trying to get the required modules to their minimums and hitting the problem there. Since those modules will never need the license check, we can probably just remove this line instead of feature testing. Ideally we'd have a test for this pre-req functionality but I'm not sure how much of a pain that will be to implement in CI, given that all the other tests install the minimum versions as a setup step. The test could only successfully run against a CI host that didn't run any of the other PowerShellGet tests I guess. |
Ah I forgot we update the pre-req if needed so yea sounds like the bootstrapping needs a better check to ensure it doesn't add |
Right, I suppose it could work as long as the default repository is removed from the system during the tests (I think it is). But to my mind the bigger issue is that the setup for other tests will not remove the newer versions of the packages, so if they run first, this test won't be testing against a system with the OOB versions. Or do you mean that we replace |
We can always just have a final task in the
Hopefully that makes sense. |
I think it mostly makes sense, except the part about using OOB versions, since as far as I know none of the psget stuff we have uses those (all the tests use the setup, since we require the same minimums for everything), though maybe I'm misremembering. |
The PR #425 should fix this. It ensures the bootstrapping code in |
Hey @jborean93, Thanks for fixing this! I've just been having trouble with it this afternoon. |
@kiweezi until the change is included in a release, you may opt to install the collection from git. I believe the command would be:
Going back to 1.10.0 is also an option. |
Ah I didn't realise you could do that, I've just tried it and things are working. Thanks a bunch! |
SUMMARY
In 1.11.0 win_psmodule is throwing the error:Problems installing PSSlack module: A parameter cannot be found that matches parameter name 'AcceptLicense'.
ISSUE TYPE
COMPONENT NAME
win_psmodule
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
Ansible running on a Win10 20h2 VM via a packer build.
STEPS TO REPRODUCE
EXPECTED RESULTS
{
"changed": true,
"nuget_changed": true,
"output": "Module PSSlack installed",
"repository_changed": false
}
ACTUAL RESULTS
I downgrading the collection to 1.10.0 and the error did not occur.
The text was updated successfully, but these errors were encountered: