Skip to content

Commit 93676e5

Browse files
committed
move install directory to bypass hashing
1 parent c0cd103 commit 93676e5

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

9.0.1/ghc/tools/chocolateyInstall.ps1

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ if($is32)
3434
if ($pp['installdir']) {
3535
$binRoot = $pp['installdir']
3636
} else {
37-
$binRoot = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
37+
$binRoot = Get-ToolsLocation
3838
}
3939
$packageFullName = Join-Path $binRoot ($packageName + '-' + $version)
4040
$binPackageDir = Join-Path $packageFullName "bin"
@@ -56,6 +56,7 @@ rm $tmpFile # Clean up temporary file
5656
$longBinPackageDir = Join-Path $binRoot $baseTarget
5757
if (Test-Path $longBinPackageDir) {
5858
Rename-Item -fo $longBinPackageDir $packageFullName
59+
Write-Host "Renamed $longBinPackageDir to $packageFullName"
5960
}
6061

6162
# FIxes issue #8

9.0.1/ghc/tools/chocolateyUninstall.ps1

+4-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ $is32 = (Get-OSArchitectureWidth 32) -or $env:chocolateyForceX86 -eq 'true'
1717
if ($pp['installdir']) {
1818
$binRoot = $pp['installdir']
1919
} else {
20-
$binRoot = $(Split-Path -parent $MyInvocation.MyCommand.Definition)
20+
$binRoot = Get-ToolsLocation
2121
}
2222
$packageFullName = Join-Path $binRoot ($packageName + '-' + $version)
2323
$binPackageDir = Join-Path $packageFullName "bin"
@@ -31,4 +31,6 @@ if (-Not $is32) {
3131
Uninstall-BinFile "ghc-$version"
3232
Uninstall-BinFile "ghci-$version"
3333
Uninstall-BinFile "haddock-$version"
34-
}
34+
}
35+
36+
Remove-Item -Force -Recurse $packageFullName

0 commit comments

Comments
 (0)