mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
Initialize ChocolateyToolsLocation variable and fix tests (#2874)
This commit is contained in:
@@ -11,10 +11,16 @@ Describe "Haskell" {
|
||||
$ghcTestCases = $ghcVersionList | ForEach-Object {
|
||||
$ghcVersion = $_
|
||||
$ghcShortVersion = ([version]$ghcVersion).ToString(3)
|
||||
$binGhcPath = Join-Path $chocoPackagesPath "ghc.$ghcVersion\tools\ghc-$ghcShortVersion\bin\ghc.exe"
|
||||
# Starting from version 9 haskell installation directory is $env:ChocolateyToolsLocation instead of $env:ChocolateyInstall\lib
|
||||
if ($ghcVersion -notmatch "^[0-8]\.\d+.*")
|
||||
{
|
||||
$binGhcPath = Join-Path $env:ChocolateyToolsLocation "ghc-$ghcShortVersion\bin\ghc.exe"
|
||||
}
|
||||
@{
|
||||
ghcVersion = $ghcVersion
|
||||
ghcShortVersion = $ghcShortVersion
|
||||
binGhcPath = Join-Path $chocoPackagesPath "ghc.$ghcVersion\tools\ghc-$ghcShortVersion\bin\ghc.exe"
|
||||
binGhcPath = $binGhcPath
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user