Skip to content
Snippets Groups Projects
Verified Commit 09a8a0bd authored by Julian Ospald's avatar Julian Ospald :tea:
Browse files

Fix build on windows and stack

parent 191f49ad
No related branches found
No related tags found
1 merge request!238Implement 'ghcup run'
...@@ -205,9 +205,11 @@ run RunOptions{..} runAppState runLogger = runRUN runAppState (do ...@@ -205,9 +205,11 @@ run RunOptions{..} runAppState runLogger = runRUN runAppState (do
[] -> liftIO $ putStr tmp [] -> liftIO $ putStr tmp
(cmd:args) -> do (cmd:args) -> do
newEnv <- liftIO $ addToPath tmp newEnv <- liftIO $ addToPath tmp
if isWindows #ifndef IS_WINDOWS
then liftE $ lEM @_ @'[ProcessError] $ exec cmd args Nothing (Just newEnv) liftIO $ SPP.executeFile cmd True args (Just newEnv)
else liftIO $ SPP.executeFile cmd True args (Just newEnv) #else
liftE $ lEM @_ @'[ProcessError] $ exec cmd args Nothing (Just newEnv)
#endif
pure () pure ()
) >>= \case ) >>= \case
VRight _ -> do VRight _ -> do
......
...@@ -267,6 +267,9 @@ executable ghcup ...@@ -267,6 +267,9 @@ executable ghcup
if os(windows) if os(windows)
cpp-options: -DIS_WINDOWS cpp-options: -DIS_WINDOWS
else
build-depends:
, unix ^>=2.7
if flag(no-exe) if flag(no-exe)
buildable: False buildable: False
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment