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

Chocolatey Dependency hangs if there should be a prompt. #119

Open
Levistator opened this issue Aug 5, 2020 · 2 comments
Open

Chocolatey Dependency hangs if there should be a prompt. #119

Levistator opened this issue Aug 5, 2020 · 2 comments

Comments

@Levistator
Copy link

I found this issue while using the 'Chocolatey::jfrog-cli' dependency.
Invoke-PSDepend would hang indefinitely without ever displaying the prompt for chocolatey.

I figured out what the issue was after attempting to run the choco command manually and getting the prompts.

The fix that I am proposing (wanted others opinions on it) is:
/PSDependScripts/Chocolatey.ps1/Invoke-ChocoInstallPackage
line 130: $chocoParams = @('upgrade', "$Name", '--limit-output', '--exact', '--no-progress', '--allow-downgrade', '--yes')
Adding the --yes parameter will cause Chocolatey to always accept for any prompts.

Otherwise, a solution would be to figure out why those prompts are not displaying already.
I think this would be a better solution but the work involved is much greater.

P.S. If I inputted a y as a response to the prompts (even though I couldn't see the prompts) it was passed through to Chocolatey and the install completed successfully.

ENVIRONMENT:
Windows 10: [Version 10.0.19041.388]
VSCode: 1.47.3
Powershell Plugin: 2020.6.0
Powershell Version: 5.1.19041.1

@gaelcolas
Copy link
Contributor

You can set choco settings to always add --yes, but I'd agree your suggestion is sensible.

@gaelcolas
Copy link
Contributor

You can also have choco configured with --yes as default by doing this: chocolatey feature enable -n allowGlobalConfirmation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants