-
Notifications
You must be signed in to change notification settings - Fork 35
The force: true parameter wraps the package name in quotes braking the install command #187
Copy link
Copy link
Labels
3 - ReviewCode has been added, and is available for review as a pull request.Code has been added, and is available for review as a pull request.BugIssues where something has happened which was not expected or intended.Issues where something has happened which was not expected or intended.
Milestone
Description
Checklist
- I confirm there are no unresolved issues reported on the Chocolatey Status page.
- I have verified this is the correct repository for opening this issue.
- I have verified no other issues exist related to my problem.
- I have verified this is not an issue for a specific package.
- I have verified this issue is not security related.
- I confirm I am using official, and not unofficial, or modified, Chocolatey products.
What You Are Seeing?
When using the force: true parameter with the chocolatey.chocolatey.win_chocolatey module it wraps the package name with "" and the install fails.
What is Expected?
I'd expect it to work with without adding "" same as without using the force: true parameter.
How Did You Get This To Happen?
I tried to use the following chocolatey.chocolatey.win_chocolatey module parameters to install packages:
- name: Installing software...
chocolatey.chocolatey.win_chocolatey:
name:
- 7zip
- firefox
state: present
force: true
System Details
- Operating System: 10.0.19045.0
- Windows PowerShell version: 5.1.19041.6456
- Chocolatey CLI Version: 2.4.3
- Chocolatey Licensed Extension version:
- Chocolatey License type:
- Terminal/Emulator: Windows PowerShell
Installed Packages
choco list:
Chocolatey v2.4.3
chocolatey 2.4.3
1 packages installed.Output Log
The full error of the failed Ansible module command:
changed: false
choco_cli_version: 2.4.3
command: C:\ProgramData\chocolatey\bin\choco.exe install "7zip firefox" --fail-on-unfound
--yes --no-progress --limit-output --force --timeout 2700
msg: Error installing package(s) '7zip firefox'
rc: 1
stderr: ''
stderr_lines: <omitted>
stdout: |-
Installing the following packages:
7zip firefox
By installing, you accept licenses for the packages.
7zip firefox not installed. The package was not found with the source(s) listed.
Source(s): 'https://community.chocolatey.org/api/v2/'
NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify `--pre`,
the package may not be found.
Please see https://docs.chocolatey.org/en-us/troubleshooting for more
assistance.
Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures
- 7zip firefox - 7zip firefox not installed. The package was not found with the source(s) listed.
Source(s): 'https://community.chocolatey.org/api/v2/'
NOTE: When you specify explicit sources, it overrides default sources.
If the package version is a prerelease and you didn't specify `--pre`,
the package may not be found.
Please see https://docs.chocolatey.org/en-us/troubleshooting for more
assistance.
stdout_lines: <omitted>Additional Context
When removing the "" around "7zip firefox" and trying the run the command manually it works. Also when removing the force: true flag from the module it works.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3 - ReviewCode has been added, and is available for review as a pull request.Code has been added, and is available for review as a pull request.BugIssues where something has happened which was not expected or intended.Issues where something has happened which was not expected or intended.