Fix bug with isolated installation of not previously installed versions

It would error out trying to set the version.
This commit is contained in:
Julian Ospald 2022-03-14 00:36:08 +01:00
parent 8c205fd18c
commit 604a6fc92b
Signed by: hasufell
GPG Key ID: 3786C5262ECB4A3F

View File

@ -398,7 +398,7 @@ install installCommand settings getAppState' runLogger = case installCommand of
isolateDir isolateDir
forceInstall forceInstall
) )
$ when instSet $ void $ setGHC v SetGHCOnly Nothing $ when instSet $ when (isNothing isolateDir) $ void $ setGHC v SetGHCOnly Nothing
pure vi pure vi
Just uri -> do Just uri -> do
runInstGHC s'{ settings = settings {noVerify = True}} instPlatform $ do runInstGHC s'{ settings = settings {noVerify = True}} instPlatform $ do
@ -409,7 +409,7 @@ install installCommand settings getAppState' runLogger = case installCommand of
isolateDir isolateDir
forceInstall forceInstall
) )
$ when instSet $ void $ setGHC v SetGHCOnly Nothing $ when instSet $ when (isNothing isolateDir) $ void $ setGHC v SetGHCOnly Nothing
pure vi pure vi
) )
>>= \case >>= \case
@ -469,7 +469,7 @@ install installCommand settings getAppState' runLogger = case installCommand of
v v
isolateDir isolateDir
forceInstall forceInstall
) $ when instSet $ void $ setCabal v ) $ when instSet $ when (isNothing isolateDir) $ void $ setCabal v
pure vi pure vi
Just uri -> do Just uri -> do
runInstTool s'{ settings = settings { noVerify = True}} instPlatform $ do runInstTool s'{ settings = settings { noVerify = True}} instPlatform $ do
@ -479,7 +479,7 @@ install installCommand settings getAppState' runLogger = case installCommand of
v v
isolateDir isolateDir
forceInstall forceInstall
) $ when instSet $ void $ setCabal v ) $ when instSet $ when (isNothing isolateDir) $ void $ setCabal v
pure vi pure vi
) )
>>= \case >>= \case
@ -520,7 +520,7 @@ install installCommand settings getAppState' runLogger = case installCommand of
v v
isolateDir isolateDir
forceInstall forceInstall
) $ when instSet $ void $ setHLS v SetHLSOnly Nothing ) $ when instSet $ when (isNothing isolateDir) $ void $ setHLS v SetHLSOnly Nothing
pure vi pure vi
Just uri -> do Just uri -> do
runInstTool s'{ settings = settings { noVerify = True}} instPlatform $ do runInstTool s'{ settings = settings { noVerify = True}} instPlatform $ do
@ -531,7 +531,7 @@ install installCommand settings getAppState' runLogger = case installCommand of
v v
isolateDir isolateDir
forceInstall forceInstall
) $ when instSet $ void $ setHLS v SetHLSOnly Nothing ) $ when instSet $ when (isNothing isolateDir) $ void $ setHLS v SetHLSOnly Nothing
pure vi pure vi
) )
>>= \case >>= \case
@ -580,7 +580,7 @@ install installCommand settings getAppState' runLogger = case installCommand of
v v
isolateDir isolateDir
forceInstall forceInstall
) $ when instSet $ void $ setStack v ) $ when instSet $ when (isNothing isolateDir) $ void $ setStack v
pure vi pure vi
Just uri -> do Just uri -> do
runInstTool s'{ settings = settings { noVerify = True}} instPlatform $ do runInstTool s'{ settings = settings { noVerify = True}} instPlatform $ do
@ -590,7 +590,7 @@ install installCommand settings getAppState' runLogger = case installCommand of
v v
isolateDir isolateDir
forceInstall forceInstall
) $ when instSet $ void $ setStack v ) $ when instSet $ when (isNothing isolateDir) $ void $ setStack v
pure vi pure vi
) )
>>= \case >>= \case