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

When performing an Install/Uninstall/Upgrade operation through the API, an error is throw for "chocolatey.resources" #811

Closed
RichiCoder1 opened this issue Jun 18, 2016 · 2 comments

Comments

@RichiCoder1
Copy link
Member

What You Are Seeing?

An error when running Install/Uninstall/Upgrade through the API.

What is Expected?

No error.

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

Pull the latest Chocolatey.Lib and do Lets.GetChocolatey().Set(config => { config.CommandName = "install"; config.PackageNames = <any package id>; }).Run();

Output Log

2016-06-17 19:13:04.713 -05:00 [Debug] Attempting to delete file "C:\ProgramData\chocolatey\config\chocolatey.config.update".
2016-06-17 19:13:09.254 -05:00 [Debug]  Found 'C:\ProgramData\chocolatey\lib\SourceTree\tools\chocolateyInstall.ps1'
  with checksum 'D90A5D2EF15E99EB289080AA81748BC8'
2016-06-17 19:13:09.568 -05:00 [Error] SourceTree not upgraded. An error occurred during installation:
 Could not find file 'chocolatey.resources'.
2016-06-17 19:13:09.577 -05:00 [Debug] Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\SourceTree.1.9.1.1\.sxs".
2016-06-17 19:13:09.577 -05:00 [Debug] Attempting to delete file "C:\ProgramData\chocolatey\.chocolatey\SourceTree.1.9.1.1\.pin".
2016-06-17 19:13:09.580 -05:00 [Debug] Attempting to delete directory "C:\ProgramData\chocolatey\lib-bad\SourceTree".
2016-06-17 19:13:09.582 -05:00 [Debug] Sending message 'HandlePackageResultCompletedMessage' out if there are subscribers...
2016-06-17 19:13:09.582 -05:00 [Error] The upgrade of sourcetree was NOT successful.
2016-06-17 19:13:09.583 -05:00 [Error] SourceTree not upgraded. An error occurred during installation:
 Could not find file 'chocolatey.resources'.
2016-06-17 19:13:09.584 -05:00 [Debug] Moving 'C:\ProgramData\chocolatey\lib\SourceTree'
 to 'C:\ProgramData\chocolatey\lib-bad\SourceTree'
2016-06-17 19:13:11.586 -05:00 [Debug] Attempting rollback
2016-06-17 19:13:11.586 -05:00 [Debug] Moving 'C:\ProgramData\chocolatey\lib-bkp\SourceTree'
 to 'C:\ProgramData\chocolatey\lib\SourceTree'
2016-06-17 19:13:13.595 -05:00 [Warning] 
Chocolatey upgraded 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2016-06-17 19:13:13.595 -05:00 [Information] 
2016-06-17 19:13:13.595 -05:00 [Error] Failures
2016-06-17 19:13:13.596 -05:00 [Error]  - sourcetree - SourceTree not upgraded. An error occurred during installation:
 Could not find file 'chocolatey.resources'.
2016-06-17 19:13:13.596 -05:00 [Warning] 
Check out Pro / Business for more features! https://chocolatey.org/compare
2016-06-17 19:13:13.596 -05:00 [Debug] Sending message 'PostRunMessage' out if there are subscribers...
@ferventcoder
Copy link
Member

I can repro this. I'm pretty sure I know what it is, so I should have a fix for this in 0.9.10.2.

@ferventcoder
Copy link
Member

Related to #814.

ferventcoder added a commit that referenced this issue Jun 19, 2016
Check the name of the assembly and if it is the licensed assembly, skip
it in resolution. If the name of assembly requested ends with
.resources, skip it entirely. This fixes the error `Could not find
file 'chocolatey.resources'.`
ferventcoder added a commit that referenced this issue Jun 19, 2016
* stable:
  (version) 0.9.10.2
  (doc) update CHANGELOG/nuspec
  (GH-758) Ensure log path exists
  (GH-813) Fix double chocolatey logging folder
  (GH-813) Shorten Template default log path
  (doc) update default options help messages
  (maint) Don't log creation of folder
  (maint) formatting / add message consistency
  (GH-814) Ensure any version of choco
  (GH-811) Skip resource / licensed assemblies
  (version) 0.9.10.1
  (doc) update CHANGELOG/nuspec
  (GH-810) Install of choco sets exit code
  (GH-812) Upgrade 7zip to 16.02 to address CVEs
  (doc) Note functions Calling Set-PowerShellExitCode
  (GH-810) Fix - Cannot bind parameter exitCode
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

3 participants