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

Installing Chocolatey 0.10.9 results in an exit code of 1 #1529

Closed
matt-richardson opened this issue Mar 27, 2018 · 6 comments
Closed

Installing Chocolatey 0.10.9 results in an exit code of 1 #1529

matt-richardson opened this issue Mar 27, 2018 · 6 comments

Comments

@matt-richardson
Copy link

matt-richardson commented Mar 27, 2018

What You Are Seeing?

Installing chocolatey is returning an exit code of 1.

What is Expected?

It should exit with 0, rather than 1.

How Did You Get This To Happen? (Steps to Reproduce)

write-output "Installing Chocolatey"
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
if ($LASTEXITCODE -ne 0) { exit 1 }

Output Log

https://gist.github.com/matt-richardson/0003caf7b04bd4b684138bb994ea48fc

Further info

Raised in gitter - https://gitter.im/chocolatey/choco?at=5ab9f00fe3d0b1ff2c704ffe

Rob Reynolds @ferventcoder 05:51
I think I know what it is!
@matt-richardson @stopthatastronaut - we converted to running choco one time to ensure the config file was generated. However if you run choco with no arguments, it exits with -1

Looks like we need to change over to choco -v instead.

Choco Admin notes

This was caused by #1401 for 0.10.9.

@ferventcoder
Copy link
Member

ferventcoder commented Mar 27, 2018

@matt-richardson thanks!

@ferventcoder ferventcoder changed the title Installing chocolatey results in an exit code of 0 Installing chocolatey 0.10.9 results in an exit code of 1 Mar 27, 2018
matt-richardson added a commit to OctopusDeploy/Octopus-Docker that referenced this issue Mar 29, 2018
jmartin-tech added a commit to rapid7/metasploit-baseline-builder that referenced this issue Apr 4, 2018
jmartin-tech added a commit to rapid7/metasploit-baseline-builder that referenced this issue Apr 5, 2018
ferventcoder added a commit that referenced this issue Apr 9, 2018
With Chocolatey v0.10.9 and #1401, we added a call to choco to
initialize the config file during installation so that it was generated
during and administrative run. That was done in commit 35add3b.

A call to choco with no switches results in an exit code of 1 instead
of 0. Recently a call to choco to create the config file on install was
added as the last step in installing Chocolatey. Unfortunately this
resulted in an install or upgrade of Chocolatey resulting in a 1
instead of a 0. Call choco -v instead ot show the version, which exits
with a 0 and also ensures the first time generation of the
chocolatey.config file.
ferventcoder added a commit that referenced this issue Apr 9, 2018
* stable:
  (doc) update release notes
  (GH-1529) Fix: install of choco exit code 1
  (GH-1532) Fix: proxy bypass with "*" causes regex error
  (GH-1531) Hold exclusive locks on non-essential logs
  (maint) formatting
  (maint) update copyright for assemblies
  (GH-1527) Fix: NuGet cache removal fixes
  (GH-1527) Use machine temp with systemprofile
@bigbearzhu
Copy link

@ferventcoder or any one please check the merge to stable branch failure? Waiting for 0.10.10 for the fix of this issue. Many thanks.

@ferventcoder
Copy link
Member

@bigbearzhu merge failure?

@bigbearzhu
Copy link

Yes, it is the commit 3fa08ca above. It failed on the coverage/coveralls check. Not sure whether that would stop the merge though.

@bigbearzhu
Copy link

Saw the new release this morning. Thank you very much!

@bigbearzhu
Copy link

@ferventcoder any idea when the chocolatey package would be updated on chocolatey.org? It is still 0.10.9 at the moment.

@ferventcoder ferventcoder changed the title Installing chocolatey 0.10.9 results in an exit code of 1 Installing Chocolatey 0.10.9 results in an exit code of 1 Apr 12, 2018
matt-richardson added a commit to OctopusDeploy/Octopus-Docker that referenced this issue Apr 26, 2018
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

4 participants