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-InstallChocolateyPackage fix for double chocolatey folder name is not also applied to the passed in file name #908

Closed
ingramc opened this issue Aug 15, 2016 · 2 comments
Assignees
Milestone

Comments

@ingramc
Copy link

ingramc commented Aug 15, 2016

What You Are Seeing?

Value passed in to $silentArgs is corrected to change chocolatey\chocolatey (issue #813) to chocolatey
Value passed in to $file is not corrected to fix chocolatey\chocolatey

What is Expected?

both variable when passed $env:TEMP\chocolatey should be evaluated to $env:TEMP

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

Extracting contents out of EXE to temp folder

$chocTempDir = Join-Path $env:TEMP 'chocolatey'
$tempDir = Join-Path $chocTempDir 'Package'
Install-ChocolateyInstallPackage 'package' 'exe' "/Q /T:$tempDir" "$fileSetupExe"

Installing software from extracted folder

$packageExe = Join-Path $tempDir 'PackageName.exe'
Install-ChocolateyInstallPackage 'package' 'exe' '/silent' "$packageExe"

Output Log

I Apologize for not having direct logs (deleted VM after passing relevant info to relevant users at the organization).

Windows 10
All Windows Updates applied
Choco 0.10.0
Debug and Verbose output displayed that extraction was to $env:TEMP\Package folder while the subsequent call passing in the full path in the file name showed ..AppDate\Local\Temp\chocolatey\chocolatey\Package\PackageName.exe resulting in the exe being reported as missing.

@ferventcoder
Copy link
Member

This looks like a definite issue - it does have some workarounds for you at the moment though, so I didn't mark it high priority.

The most significant and easy workaround is to set the cacheLocation

choco config set cacheLocation somedirectory - this is what $env:TEMP gets set to, so you will not see the double chocolatey.

@ferventcoder ferventcoder self-assigned this Sep 2, 2016
@ferventcoder
Copy link
Member

ferventcoder commented Sep 2, 2016

Fixed in 602fd0f

ferventcoder added a commit that referenced this issue Sep 2, 2016
For GH-813 (ae2e857), the double `chocolatey\chocolatey` folder was
removed from `$silentArgs` and `$additionalInstallArgs`, but `$file`
was missed. These changes were originally necessary due to changes in
GH-590 (a9519b5). Ensure that $file is also set properly so it no
longer uses a double chocolatey folder.
ferventcoder added a commit that referenced this issue Sep 2, 2016
* stable:
  (GH-908) Fix Double Chocolatey folder for $file
@ferventcoder ferventcoder changed the title Chocolatey-InstallChocolateyPackage fix for double chocolatey folder name is not also applied to the passed in file name. Chocolatey-InstallChocolateyPackage fix for double chocolatey folder name is not also applied to the passed in file name Sep 8, 2016
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