Fix build on windows
This commit is contained in:
parent
544c618473
commit
873dd77a6f
@ -164,8 +164,10 @@ library
|
||||
cpp-options: -DIS_WINDOWS
|
||||
other-modules:
|
||||
GHCup.Prelude.File.Windows
|
||||
GHCup.Prelude.Process.Windows
|
||||
GHCup.Prelude.Windows
|
||||
-- GHCup.OptParse.Run uses this
|
||||
exposed-modules:
|
||||
GHCup.Prelude.Process.Windows
|
||||
|
||||
build-depends:
|
||||
, bzlib
|
||||
|
@ -211,8 +211,8 @@ exec exe args chdir env = do
|
||||
let paths = ["PATH", "Path"]
|
||||
curPaths = (\x -> maybe [] splitSearchPath (Map.lookup x cEnv)) =<< paths
|
||||
newPath = intercalate [searchPathSeparator] curPaths
|
||||
setEnv "PATH" ""
|
||||
setEnv "Path" newPath
|
||||
liftIO $ setEnv "PATH" ""
|
||||
liftIO $ setEnv "Path" newPath
|
||||
cp <- createProcessWithMingwPath ((proc exe args) { cwd = chdir, env = env })
|
||||
exit_code <- liftIO $ withCreateProcess cp $ \_ _ _ p -> waitForProcess p
|
||||
pure $ toProcessError exe args exit_code
|
||||
@ -230,8 +230,8 @@ execNoMinGW exe args chdir env = do
|
||||
let paths = ["PATH", "Path"]
|
||||
curPaths = (\x -> maybe [] splitSearchPath (Map.lookup x cEnv)) =<< paths
|
||||
newPath = intercalate [searchPathSeparator] curPaths
|
||||
setEnv "PATH" ""
|
||||
setEnv "Path" newPath
|
||||
liftIO $ setEnv "PATH" ""
|
||||
liftIO $ setEnv "Path" newPath
|
||||
let cp = (proc exe args) { cwd = chdir, env = env }
|
||||
exit_code <- liftIO $ withCreateProcess cp $ \_ _ _ p -> waitForProcess p
|
||||
pure $ toProcessError exe args exit_code
|
||||
|
Loading…
Reference in New Issue
Block a user