Fix build on windows and stack

This commit is contained in:
Julian Ospald 2022-02-10 18:35:25 +01:00
parent 191f49adfc
commit 09a8a0bda0
Signed by: hasufell
GPG Key ID: 3786C5262ECB4A3F
2 changed files with 8 additions and 3 deletions

View File

@ -205,9 +205,11 @@ run RunOptions{..} runAppState runLogger = runRUN runAppState (do
[] -> liftIO $ putStr tmp
(cmd:args) -> do
newEnv <- liftIO $ addToPath tmp
if isWindows
then liftE $ lEM @_ @'[ProcessError] $ exec cmd args Nothing (Just newEnv)
else liftIO $ SPP.executeFile cmd True args (Just newEnv)
#ifndef IS_WINDOWS
liftIO $ SPP.executeFile cmd True args (Just newEnv)
#else
liftE $ lEM @_ @'[ProcessError] $ exec cmd args Nothing (Just newEnv)
#endif
pure ()
) >>= \case
VRight _ -> do

View File

@ -267,6 +267,9 @@ executable ghcup
if os(windows)
cpp-options: -DIS_WINDOWS
else
build-depends:
, unix ^>=2.7
if flag(no-exe)
buildable: False