Fix mingw PATH handling wrt #371
This commit is contained in:
parent
c7dc77e6bc
commit
bcff46d3d4
@ -231,8 +231,9 @@ createProcessWithMingwPath :: MonadIO m
|
|||||||
createProcessWithMingwPath cp = do
|
createProcessWithMingwPath cp = do
|
||||||
msys2Dir <- liftIO ghcupMsys2Dir
|
msys2Dir <- liftIO ghcupMsys2Dir
|
||||||
cEnv <- Map.fromList <$> maybe (liftIO getEnvironment) pure (env cp)
|
cEnv <- Map.fromList <$> maybe (liftIO getEnvironment) pure (env cp)
|
||||||
let mingWPaths = [msys2Dir </> "usr" </> "bin"
|
let mingWPaths = [msys2Dir </> "mingw64" </> "bin"
|
||||||
,msys2Dir </> "mingw64" </> "bin"]
|
,msys2Dir </> "usr" </> "bin"
|
||||||
|
]
|
||||||
paths = ["PATH", "Path"]
|
paths = ["PATH", "Path"]
|
||||||
curPaths = (\x -> maybe [] splitSearchPath (Map.lookup x cEnv)) =<< paths
|
curPaths = (\x -> maybe [] splitSearchPath (Map.lookup x cEnv)) =<< paths
|
||||||
newPath = intercalate [searchPathSeparator] (mingWPaths ++ curPaths)
|
newPath = intercalate [searchPathSeparator] (mingWPaths ++ curPaths)
|
||||||
|
@ -537,7 +537,7 @@ adjust_cabal_config() {
|
|||||||
else
|
else
|
||||||
cabal_bin="$HOME/AppData/Roaming/cabal/bin"
|
cabal_bin="$HOME/AppData/Roaming/cabal/bin"
|
||||||
fi
|
fi
|
||||||
edo cabal user-config -a "extra-prog-path: $(cygpath -w "$GHCUP_BIN"), $(cygpath -w "$cabal_bin"), $(cygpath -w "$GHCUP_MSYS2"/usr/bin), $(cygpath -w "$GHCUP_MSYS2"/mingw64/bin)" -a "extra-include-dirs: $(cygpath -w "$GHCUP_MSYS2"/mingw64/include)" -a "extra-lib-dirs: $(cygpath -w "$GHCUP_MSYS2"/mingw64/lib)" -f init
|
edo cabal 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
|
||||||
}
|
}
|
||||||
|
|
||||||
ask_cabal_config_init() {
|
ask_cabal_config_init() {
|
||||||
|
Loading…
Reference in New Issue
Block a user