diff --git a/images/ubuntu/scripts/build/install-haskell.sh b/images/ubuntu/scripts/build/install-haskell.sh index b5a6b09c0..4af05755d 100644 --- a/images/ubuntu/scripts/build/install-haskell.sh +++ b/images/ubuntu/scripts/build/install-haskell.sh @@ -23,8 +23,8 @@ prepend_etc_environment_path $ghcup_bin available_versions=$(ghcup list -t ghc -r | grep -v "prerelease" | awk '{print $2}') -# Install 2 latest Haskell Major.Minor versions -major_minor_versions=$(echo "$available_versions" | cut -d"." -f 1,2 | uniq | tail -n2) +# Install latest Haskell Major.Minor version +major_minor_versions=$(echo "$available_versions" | cut -d"." -f 1,2 | uniq | tail -n1) for major_minor_version in $major_minor_versions; do full_version=$(echo "$available_versions" | grep "$major_minor_version." | tail -n1) echo "install ghc version $full_version..." diff --git a/images/ubuntu/scripts/tests/Haskell.Tests.ps1 b/images/ubuntu/scripts/tests/Haskell.Tests.ps1 index a620df5c3..18717ae12 100644 --- a/images/ubuntu/scripts/tests/Haskell.Tests.ps1 +++ b/images/ubuntu/scripts/tests/Haskell.Tests.ps1 @@ -2,12 +2,6 @@ Describe "Haskell" { $GHCCommonPath = "/usr/local/.ghcup/ghc" $GHCVersions = Get-ChildItem -Path $GHCCommonPath | Where-Object { $_.Name -match "\d+\.\d+" } - $testCase = @{ GHCVersions = $GHCVersions } - - It "GHC directory contains two version of GHC" -TestCases $testCase { - $GHCVersions.Count | Should -Be 2 - } - $testCases = $GHCVersions | ForEach-Object { @{ GHCPath = "${_}/bin/ghc"} } It "GHC version " -TestCases $testCases {