Skip to content

Commit

Permalink
(GH-969) Remove double choco folder if file exists
Browse files Browse the repository at this point in the history
Only remove the file path from the double chocolatey folder in the temp
directory when a file exists at that location.
  • Loading branch information
ferventcoder committed Sep 22, 2016
1 parent 3057041 commit 56bf25c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,13 @@ Pro / Business supports a single, ubiquitous install directory option.
$overrideArguments = $env:chocolateyInstallOverride;

# remove \chocolatey\chocolatey\
# might be a slight issue here if the download path is the older
$silentArgs = $silentArgs -replace '\\chocolatey\\chocolatey\\', '\chocolatey\'
$additionalInstallArgs = $additionalInstallArgs -replace '\\chocolatey\\chocolatey\\', '\chocolatey\'
$file = $file -replace '\\chocolatey\\chocolatey\\', '\chocolatey\'
$updatedFilePath = $file -replace '\\chocolatey\\chocolatey\\', '\chocolatey\'
if ([System.IO.File]::Exists($updatedFilePath)) {
$file = $updatedFilePath
}

$workingDirectory = Get-Location
try {
Expand Down

0 comments on commit 56bf25c

Please sign in to comment.