Skip to content

Commit 46b2e59

Browse files
committed
Allow to set ghcup msys2 environment
Fixes #982
1 parent c2186bb commit 46b2e59

File tree

9 files changed

+157
-30
lines changed

9 files changed

+157
-30
lines changed

.github/scripts/test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ rm "ghcup-test${ext}" "ghcup-test-optparse${ext}"
3939

4040
eghcup --numeric-version
4141

42+
# test PATH on windows wrt msys2
43+
# https://github.com/haskell/ghcup-hs/pull/992/checks
44+
if [ "${OS}" = "Windows" ] ; then
45+
eghcup run -m -- sh -c 'echo $PATH' | sed 's/:/\n/' | grep '^/mingw64/bin$'
46+
fi
47+
4248
eghcup install ghc "${GHC_VER}"
4349
eghcup unset ghc "${GHC_VER}"
4450
ls -lah "$(eghcup whereis -d ghc "${GHC_VER}")"

.github/workflows/bootstrap.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ jobs:
5252
- if: runner.os == 'Windows'
5353
name: Run bootstrap
5454
run: |
55+
$ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop
5556
$curDir = Get-Location
5657
Write-Host "Current Working Directory: $curDir"
57-
./scripts/bootstrap/bootstrap-haskell.ps1 -InstallDir ${GITHUB_WORKSPACE} -BootstrapUrl ("{0}/scripts/bootstrap/bootstrap-haskell" -f $curDir) -InBash
58+
./scripts/bootstrap/bootstrap-haskell.ps1 -InstallDir ${GITHUB_WORKSPACE} -BootstrapUrl ("{0}/scripts/bootstrap/bootstrap-haskell" -f $curDir) -InBash -Msys2Env "MINGW64"
5859
shell: pwsh
60+

docs/guide.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ This is the complete list of env variables that change GHCup behavior:
105105
On windows, there's additionally:
106106

107107
* `GHCUP_MSYS2`: Has to point to the root of an existing MSYS2 installation (when installed by GHCup, that's e.g. `C:\ghcup\msys64`). GHCup bootstrap takes care of this usually.
108+
* `GHCUP_MSYS2_ENV`: The [MSYS2 environment](https://www.msys2.org/docs/environments/) to use when executing e.g. `ghcup run --mingw-path`. Possible values are `MSYS`, `UCRT64`, `CLANG64`, `CLANGARM64`, `CLANG32`, `MINGW64`, `MINGW32`. Defaults to `MINGW64`, `MINGW32` or `CLANGARM64`, depending on the architecture. `MSYS` is always added as the last component. If you change this value after running the bootstrap script, you may need to make sure that the cabal config reflects this change, more specifically `extra-prog-path`, `extra-include-dirs` and `extra-lib-dirs`. (**NOTE: specifying anything other than the default is considered experimental**)
108109

109110
### XDG support
110111

@@ -508,7 +509,7 @@ See `ghcup compile ghc --help` for further information.
508509

509510
Since ghcup version 0.1.20.0, we provide cross bindists for GHC JS and WASM. These can be installed conveniently.
510511
However, these are intended as a developer preview only. By using these GHC variants, you are implicitly signing up to participate in GHC development!
511-
If you run into bugs or missing behavior, join the dev chat at https://matrix.to/#/#GHC:matrix.org.
512+
If you run into bugs or missing behavior, join the dev chat at https://matrix.to/#/#GHC:matrix.org.
512513

513514
First, add the cross release channel:
514515

lib/GHCup/Prelude/Process/Windows.hs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -263,24 +263,14 @@ createProcessWithMingwPath :: MonadIO m
263263
=> CreateProcess
264264
-> m CreateProcess
265265
createProcessWithMingwPath cp = do
266-
msys2Dir <- liftIO ghcupMsys2Dir
267266
cEnv <- Map.fromList <$> maybe (liftIO getEnvironment) pure (env cp)
268-
let mingWPaths = [msys2Dir </> "mingw64" </> "bin"
269-
,msys2Dir </> "usr" </> "bin"
270-
]
271-
paths = ["PATH", "Path"]
267+
mingWPaths <- liftIO ghcupMsys2BinDirs'
268+
let paths = ["PATH", "Path"]
272269
curPaths = (\x -> maybe [] splitSearchPath (Map.lookup x cEnv)) =<< paths
273270
newPath = intercalate [searchPathSeparator] (mingWPaths ++ curPaths)
274271
envWithoutPath = foldr (\x y -> Map.delete x y) cEnv paths
275272
envWithNewPath = Map.insert "Path" newPath envWithoutPath
276273
liftIO $ setEnv "Path" newPath
277274
pure $ cp { env = Just $ Map.toList envWithNewPath }
278275

279-
ghcupMsys2Dir :: IO FilePath
280-
ghcupMsys2Dir =
281-
lookupEnv "GHCUP_MSYS2" >>= \case
282-
Just fp -> pure fp
283-
Nothing -> do
284-
baseDir <- liftIO ghcupBaseDir
285-
pure (fromGHCupPath baseDir </> "msys64")
286276

lib/GHCup/Types.hs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,23 @@ data Dirs = Dirs
544544
, dbDir :: GHCupPath
545545
, recycleDir :: GHCupPath -- mainly used on windows
546546
, tmpDir :: GHCupPath
547+
, msys2Dir :: FilePath
547548
}
548549
deriving (Show, GHC.Generic)
549550

550551
instance NFData Dirs
551552

553+
data MSYS2Env = MSYS
554+
| UCRT64
555+
| CLANG64
556+
| CLANGARM64
557+
| CLANG32
558+
| MINGW64
559+
| MINGW32
560+
deriving (Eq, Show, Ord, GHC.Generic, Read)
561+
562+
instance NFData MSYS2Env
563+
552564
data KeepDirs = Always
553565
| Errors
554566
| Never

lib/GHCup/Utils.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1155,7 +1155,7 @@ ensureShimGen
11551155

11561156
-- | Ensure ghcup directory structure exists.
11571157
ensureDirectories :: Dirs -> IO ()
1158-
ensureDirectories (Dirs baseDir binDir cacheDir logsDir confDir trashDir dbDir tmpDir) = do
1158+
ensureDirectories (Dirs baseDir binDir cacheDir logsDir confDir trashDir dbDir tmpDir _) = do
11591159
createDirRecursive' (fromGHCupPath baseDir)
11601160
createDirRecursive' (fromGHCupPath baseDir </> "ghc")
11611161
createDirRecursive' (fromGHCupPath baseDir </> "hls")

lib/GHCup/Utils/Dirs.hs

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ module GHCup.Utils.Dirs
3232
, getConfigFilePath'
3333
, useXDG
3434
, cleanupTrash
35+
, ghcupMsys2BinDirs
36+
, ghcupMsys2BinDirs'
3537

3638
, GHCupPath
3739
, appendGHCupPath
@@ -136,6 +138,7 @@ import GHC.IO.Exception ( IOErrorType(NoSuchThing) )
136138
import Haskus.Utils.Variant.Excepts
137139
import Optics hiding ( uncons )
138140
import Safe
141+
import System.Info
139142
import System.Directory hiding ( removeDirectory
140143
, removeDirectoryRecursive
141144
, removePathForcibly
@@ -338,6 +341,48 @@ ghcupTMPDir
338341
else ghcupBaseDir <&> (\(GHCupPath gp) -> GHCupPath (gp </> "tmp"))
339342

340343

344+
ghcupMsys2Dir :: IO FilePath
345+
ghcupMsys2Dir =
346+
lookupEnv "GHCUP_MSYS2" >>= \case
347+
Just fp -> pure fp
348+
Nothing -> do
349+
baseDir <- liftIO ghcupBaseDir
350+
pure (fromGHCupPath baseDir </> "msys64")
351+
352+
ghcupMsys2BinDirs :: (MonadFail m, MonadIO m, MonadReader env m, HasDirs env) => m [FilePath]
353+
ghcupMsys2BinDirs = do
354+
Dirs{..} <- getDirs
355+
liftIO $ ghcupMsys2BinDirs_ msys2Dir
356+
357+
ghcupMsys2BinDirs' :: IO [FilePath]
358+
ghcupMsys2BinDirs' = do
359+
msys2Dir <- ghcupMsys2Dir
360+
ghcupMsys2BinDirs_ msys2Dir
361+
362+
ghcupMsys2BinDirs_ :: FilePath -> IO [FilePath]
363+
ghcupMsys2BinDirs_ msys2Dir' = do
364+
env <- liftIO (lookupEnv "GHCUP_MSYS2_ENV") >>= \case
365+
Just env -> maybe (fail parseFailMsg) pure $ readMay @MSYS2Env env
366+
Nothing
367+
| "x86_64" <- arch -> pure MINGW64
368+
| "i386" <- arch -> pure MINGW32
369+
| "aarch64" <- arch -> pure CLANGARM64
370+
| otherwise -> fail "No compatible architecture for msys2"
371+
pure [msys2Dir' </> toEnvDir env </> "bin", msys2Dir' </> toEnvDir MSYS </> "bin"]
372+
where
373+
-- https://www.msys2.org/docs/environments/
374+
toEnvDir :: MSYS2Env -> FilePath
375+
toEnvDir MSYS = "usr"
376+
toEnvDir UCRT64 = "ucrt64"
377+
toEnvDir CLANG64 = "clang64"
378+
toEnvDir CLANGARM64 = "clangarm64"
379+
toEnvDir CLANG32 = "clang32"
380+
toEnvDir MINGW64 = "mingw64"
381+
toEnvDir MINGW32 = "mingw32"
382+
383+
parseFailMsg = "Invalid value for GHCUP_MSYS2_ENV. Valid values are: MSYS, UCRT64, CLANG64, CLANGARM64, CLANG32, MINGW64, MINGW32"
384+
385+
341386
getAllDirs :: IO Dirs
342387
getAllDirs = do
343388
baseDir <- ghcupBaseDir
@@ -348,6 +393,7 @@ getAllDirs = do
348393
recycleDir <- ghcupRecycleDir
349394
tmpDir <- ghcupTMPDir
350395
dbDir <- ghcupDbDir
396+
msys2Dir <- ghcupMsys2Dir
351397
pure Dirs { .. }
352398

353399

scripts/bootstrap/bootstrap-haskell

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,23 @@
2020
# * BOOTSTRAP_HASKELL_ADJUST_CABAL_CONFIG - whether to adjust mingw paths in cabal.config on windows
2121
# * BOOTSTRAP_HASKELL_DOWNLOADER - which downloader to use (default: curl)
2222
# * GHCUP_BASE_URL - the base url for ghcup binary download (use this to overwrite https://downloads.haskell.org/~ghcup with a mirror)
23+
# * GHCUP_MSYS2_ENV - the msys2 environment to use on windows, see https://www.msys2.org/docs/environments/ (defauts to MINGW64, MINGW32 or CLANGARM64, depending on the architecture)
2324

2425
# License: LGPL-3.0
2526

2627

2728
# safety subshell to avoid executing anything in case this script is not downloaded properly
2829
(
2930

31+
die() {
32+
if [ -n "${NO_COLOR}" ] ; then
33+
(>&2 printf "%s\\n" "$1")
34+
else
35+
(>&2 printf "\\033[0;31m%s\\033[0m\\n" "$1")
36+
fi
37+
exit 2
38+
}
39+
3040
plat="$(uname -s)"
3141
arch=$(uname -m)
3242
ghver="0.1.20.0"
@@ -55,18 +65,40 @@ case "${plat}" in
5565
;;
5666
esac
5767

68+
case "${GHCUP_MSYS2_ENV}" in
69+
"")
70+
case "${arch}" in
71+
x86_64|amd64)
72+
GHCUP_MSYS2_ENV_DIR="mingw64" ;;
73+
i*86)
74+
GHCUP_MSYS2_ENV_DIR="mingw32" ;;
75+
aarch64|arm64)
76+
GHCUP_MSYS2_ENV_DIR="clangarm64" ;;
77+
*) die "Unknown architecture: ${arch}" ;;
78+
esac
79+
;;
80+
MSYS)
81+
GHCUP_MSYS2_ENV_DIR="usr" ;;
82+
UCRT64)
83+
GHCUP_MSYS2_ENV_DIR="ucrt64" ;;
84+
CLANG64)
85+
GHCUP_MSYS2_ENV_DIR="clang64" ;;
86+
CLANGARM64)
87+
GHCUP_MSYS2_ENV_DIR="clangarm64" ;;
88+
CLANG32)
89+
GHCUP_MSYS2_ENV_DIR="clang32" ;;
90+
MINGW64)
91+
GHCUP_MSYS2_ENV_DIR="mingw64" ;;
92+
MINGW32)
93+
GHCUP_MSYS2_ENV_DIR="mingw32" ;;
94+
*)
95+
die "Invalid value for GHCUP_MSYS2_ENV. Valid values are: MSYS, UCRT64, CLANG64, CLANGARM64, CLANG32, MINGW64, MINGW32" ;;
96+
esac
97+
5898
: "${BOOTSTRAP_HASKELL_GHC_VERSION:=recommended}"
5999
: "${BOOTSTRAP_HASKELL_CABAL_VERSION:=recommended}"
60100

61101

62-
die() {
63-
if [ -n "${NO_COLOR}" ] ; then
64-
(>&2 printf "%s\\n" "$1")
65-
else
66-
(>&2 printf "\\033[0;31m%s\\033[0m\\n" "$1")
67-
fi
68-
exit 2
69-
}
70102

71103
warn() {
72104
if [ -n "${NO_COLOR}" ] ; then
@@ -595,7 +627,7 @@ adjust_cabal_config() {
595627
else
596628
cabal_bin="$HOME/AppData/Roaming/cabal/bin"
597629
fi
598-
ecabal user-config -a "extra-prog-path: $(cygpath -w "$GHCUP_BIN"), $(cygpath -w "$cabal_bin"), $(cygpath -w "$GHCUP_MSYS2"/mingw64/bin), $(cygpath -w "$GHCUP_MSYS2"/usr/bin)" -a "extra-include-dirs: $(cygpath -w "$GHCUP_MSYS2"/mingw64/include)" -a "extra-lib-dirs: $(cygpath -w "$GHCUP_MSYS2"/mingw64/lib)" -f init
630+
ecabal user-config -a "extra-prog-path: $(cygpath -w "$GHCUP_BIN"), $(cygpath -w "$cabal_bin"), $(cygpath -w "$GHCUP_MSYS2"/${GHCUP_MSYS2_ENV_DIR}/bin), $(cygpath -w "$GHCUP_MSYS2"/usr/bin)" -a "extra-include-dirs: $(cygpath -w "$GHCUP_MSYS2"/${GHCUP_MSYS2_ENV_DIR}/include)" -a "extra-lib-dirs: $(cygpath -w "$GHCUP_MSYS2"/${GHCUP_MSYS2_ENV_DIR}/lib)" -f init
599631
}
600632

601633
ask_cabal_config_init() {

scripts/bootstrap/bootstrap-haskell.ps1

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ param (
4646
# Whether to disable creation of several desktop shortcuts
4747
[switch]$DontWriteDesktopShortcuts,
4848
# Whether to disable adjusting bashrc (in msys2 env) with PATH
49-
[switch]$DontAdjustBashRc
49+
[switch]$DontAdjustBashRc,
50+
# The msys2 environment to use, see https://www.msys2.org/docs/environments/ (defauts to MINGW64, MINGW32 or CLANGARM64, depending on the architecture)
51+
[string]$Msys2Env
5052
)
5153

5254
$DefaultMsys2Version = "20221216"
@@ -194,6 +196,37 @@ if (!$SupportedArchitectures.contains($env:PROCESSOR_ARCHITECTURE)) {
194196
Exit 1
195197
}
196198

199+
# parse Msys2Env and set the corresponding variables
200+
if (!$Msys2Env) {
201+
if ($env:PROCESSOR_ARCHITECTURE -eq 'x86') {
202+
$Msys2Env = 'MINGW32'
203+
$ShellType = '-mingw32'
204+
$PkgConf = 'mingw-w64-i686-pkgconf'
205+
} elseif ($env:PROCESSOR_ARCHITECTURE -eq 'AMD64') {
206+
$Msys2Env = 'MINGW64'
207+
$ShellType = '-mingw64'
208+
$PkgConf = 'mingw-w64-x86_64-pkgconf'
209+
}
210+
} elseif ($Msys2Env -eq 'MINGW32') {
211+
$ShellType = '-mingw32'
212+
$PkgConf = 'mingw-w64-i686-pkgconf'
213+
} elseif ($Msys2Env -eq 'MINGW64') {
214+
$ShellType = '-mingw64'
215+
$PkgConf = 'mingw-w64-x86_64-pkgconf'
216+
} elseif ($Msys2Env -eq 'MSYS') {
217+
$ShellType = '-msys2'
218+
$PkgConf = 'pkgconf'
219+
} elseif ($Msys2Env -eq 'UCRT64') {
220+
$ShellType = '-ucrt64'
221+
$PkgConf = 'mingw-w64-ucrt-x86_64-pkgconf'
222+
} elseif ($Msys2Env -eq 'CLANG64') {
223+
$ShellType = '-clang64'
224+
$PkgConf = 'mingw-w64-clang-x86_64-pkgconf'
225+
} else {
226+
Print-Msg -color Red -msg ("Unsupported Msys2 environment: {0}. Supported environments are: MINGW64, MINGW32, MSYS, UCRT64, CLANG64" -f $Msys2Env)
227+
Exit 1
228+
}
229+
197230
$ErrorActionPreference = 'Stop'
198231

199232
$GhcupBasePrefixEnv = [System.Environment]::GetEnvironmentVariable('GHCUP_INSTALL_BASE_PREFIX', 'user')
@@ -501,7 +534,7 @@ if (!(Test-Path -Path ('{0}' -f $MsysDir))) {
501534
Exec "$Bash" '-lc' 'pacman --noconfirm -Syuu'
502535

503536
Print-Msg -msg 'Installing Dependencies...'
504-
Exec "$Bash" '-lc' 'pacman --noconfirm -S --needed curl autoconf mingw-w64-x86_64-pkgconf'
537+
Exec "$Bash" '-lc' ('pacman --noconfirm -S --needed curl autoconf {0}' -f $PkgConf)
505538

506539
Print-Msg -msg 'Updating SSL root certificate authorities...'
507540
Exec "$Bash" '-lc' 'pacman --noconfirm -S ca-certificates'
@@ -609,9 +642,9 @@ if ($Host.Name -eq "ConsoleHost")
609642
}
610643
'@
611644

612-
$GhcInstArgs = '-mingw64 -mintty -c "pacman --noconfirm -S --needed base-devel gettext autoconf make libtool automake python p7zip patch unzip"'
645+
$GhcInstArgs = ('{0} -mintty -c "pacman --noconfirm -S --needed base-devel gettext autoconf make libtool automake python p7zip patch unzip"' -f $ShellType)
613646
Create-Shortcut -SourceExe ('{0}\msys2_shell.cmd' -f $MsysDir) -ArgumentsToSourceExe $GhcInstArgs -DestinationPath 'Install GHC dev dependencies.lnk' -TempPath $GhcupDir
614-
Create-Shortcut -SourceExe ('{0}\msys2_shell.cmd' -f $MsysDir) -ArgumentsToSourceExe '-mingw64' -DestinationPath 'Mingw haskell shell.lnk' -TempPath $GhcupDir
647+
Create-Shortcut -SourceExe ('{0}\msys2_shell.cmd' -f $MsysDir) -ArgumentsToSourceExe $ShellType -DestinationPath 'Mingw haskell shell.lnk' -TempPath $GhcupDir
615648
Create-Shortcut -SourceExe 'https://www.msys2.org/docs/package-management' -ArgumentsToSourceExe '' -DestinationPath 'Mingw package management docs.url' -TempPath $GhcupDir
616649
$DesktopDir = [Environment]::GetFolderPath("Desktop")
617650
$null = New-Item -Path $DesktopDir -Name "Uninstall Haskell.ps1" -ItemType "file" -Force -Value $uninstallShortCut
@@ -660,10 +693,15 @@ if (!($DontAdjustBashRc)) {
660693
$AdjustBashRcExport = 'export BOOTSTRAP_HASKELL_ADJUST_BASHRC=1 ;'
661694
}
662695

696+
# set msys2 env export for the shell bootstrap script
697+
$Msys2EnvExport = ('export GHCUP_MSYS2_ENV={0} ;' -f $Msys2Env)
698+
# export GHCUP_MSYS2_ENV
699+
$null = [Environment]::SetEnvironmentVariable("GHCUP_MSYS2_ENV", $Msys2Env, [System.EnvironmentVariableTarget]::User)
700+
663701
if ((Get-Process -ID $PID).ProcessName.StartsWith("bootstrap-haskell") -Or $InBash) {
664-
Exec "$Bash" '-lc' ('{4} {6} {7} {8} {9} {10} {12} [ -n ''{1}'' ] && export GHCUP_MSYS2=$(cygpath -m ''{1}'') ; [ -n ''{2}'' ] && export GHCUP_INSTALL_BASE_PREFIX=$(cygpath -m ''{2}/'') ; export PATH=$(cygpath -u ''{3}/bin''):$PATH ; export CABAL_DIR=''{5}'' ; [[ ''{0}'' = https* ]] && {11} {0} | bash || cat $(cygpath -m ''{0}'') | bash' -f $BootstrapUrl, $MsysDir, $GhcupBasePrefix, $GhcupDir, $SilentExport, $CabalDirFull, $StackInstallExport, $HLSInstallExport, $AdjustCabalConfigExport, $MinimalExport, $BootstrapDownloader, $DownloadScript, $AdjustBashRcExport)
702+
Exec "$Bash" '-lc' ('{4} {6} {7} {8} {9} {10} {12} {13} [ -n ''{1}'' ] && export GHCUP_MSYS2=$(cygpath -m ''{1}'') ; [ -n ''{2}'' ] && export GHCUP_INSTALL_BASE_PREFIX=$(cygpath -m ''{2}/'') ; export PATH=$(cygpath -u ''{3}/bin''):$PATH ; export CABAL_DIR=''{5}'' ; [[ ''{0}'' = https* ]] && {11} {0} | bash || cat $(cygpath -m ''{0}'') | bash' -f $BootstrapUrl, $MsysDir, $GhcupBasePrefix, $GhcupDir, $SilentExport, $CabalDirFull, $StackInstallExport, $HLSInstallExport, $AdjustCabalConfigExport, $MinimalExport, $BootstrapDownloader, $DownloadScript, $AdjustBashRcExport, $Msys2EnvExport)
665703
} else {
666-
Exec "$Msys2Shell" '-mingw64' '-mintty' '-shell' 'bash' '-c' ('{4} {6} {7} {8} {9} {10} {12} [ -n ''{1}'' ] && export GHCUP_MSYS2=$(cygpath -m ''{1}'') ; [ -n ''{2}'' ] && export GHCUP_INSTALL_BASE_PREFIX=$(cygpath -m ''{2}/'') ; export PATH=$(cygpath -u ''{3}/bin''):$PATH ; export CABAL_DIR=''{5}'' ; trap ''echo Press any key to exit && read -n 1 && exit'' 2 ; [[ ''{0}'' = https* ]] && {11} {0} | bash || cat $(cygpath -m ''{0}'') | bash ; echo ''Press any key to exit'' && read -n 1' -f $BootstrapUrl, $MsysDir, $GhcupBasePrefix, $GhcupDir, $SilentExport, $CabalDirFull, $StackInstallExport, $HLSInstallExport, $AdjustCabalConfigExport, $MinimalExport, $BootstrapDownloader, $DownloadScript, $AdjustBashRcExport)
704+
Exec "$Msys2Shell" $ShellType '-mintty' '-shell' 'bash' '-c' ('{4} {6} {7} {8} {9} {10} {12} {13} [ -n ''{1}'' ] && export GHCUP_MSYS2=$(cygpath -m ''{1}'') ; [ -n ''{2}'' ] && export GHCUP_INSTALL_BASE_PREFIX=$(cygpath -m ''{2}/'') ; export PATH=$(cygpath -u ''{3}/bin''):$PATH ; export CABAL_DIR=''{5}'' ; trap ''echo Press any key to exit && read -n 1 && exit'' 2 ; [[ ''{0}'' = https* ]] && {11} {0} | bash || cat $(cygpath -m ''{0}'') | bash ; echo ''Press any key to exit'' && read -n 1' -f $BootstrapUrl, $MsysDir, $GhcupBasePrefix, $GhcupDir, $SilentExport, $CabalDirFull, $StackInstallExport, $HLSInstallExport, $AdjustCabalConfigExport, $MinimalExport, $BootstrapDownloader, $DownloadScript, $AdjustBashRcExport, $Msys2EnvExport)
667705
}
668706

669707

0 commit comments

Comments
 (0)