This repository was archived by the owner on Oct 7, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ execCabal_ :: [String] -> Action ()
2424execCabal_ = execCabalWithOriginalPath
2525
2626execCabalWithOriginalPath :: CmdResult r => [String ] -> Action r
27- execCabalWithOriginalPath = withOriginalPath . (command [] " cabal" )
27+ execCabalWithOriginalPath = withoutStackCachedBinaries . (command [] " cabal" )
2828
2929cabalBuildData :: Action ()
3030cabalBuildData = do
@@ -77,7 +77,7 @@ cabalInstallHie versionNumber = do
7777installCabalWithStack :: Action ()
7878installCabalWithStack = do
7979 -- try to find existing `cabal` executable with appropriate version
80- mbc <- withOriginalPath (liftIO (findExecutable " cabal" ))
80+ mbc <- withoutStackCachedBinaries (liftIO (findExecutable " cabal" ))
8181
8282 case mbc of
8383 Just c -> do
Original file line number Diff line number Diff line change @@ -99,16 +99,16 @@ stackBuildFailMsg =
9999 ++ " If this does not work, open an issue at \n "
100100 ++ " \t https://github.com/haskell/haskell-ide-engine"
101101
102- -- | Run actions with the original user path, without stack additions
103- withOriginalPath :: Action a -> Action a
104- withOriginalPath action = do
102+ -- | Run actions without the stack cached binaries
103+ withoutStackCachedBinaries :: Action a -> Action a
104+ withoutStackCachedBinaries action = do
105105 mbPath <- liftIO (lookupEnv " PATH" )
106106
107107 case (mbPath, isRunFromStack) of
108108
109109 (Just paths, True ) -> do
110110 snapshotDir <- trimmedStdout <$> execStackShake [" path" , " --snapshot-install-root" ]
111- localInstallDir <- trimmedStdout <$> execStackShake [" path" , " --local-install-dir " ]
111+ localInstallDir <- trimmedStdout <$> execStackShake [" path" , " --local-install-root " ]
112112
113113 let cacheBinPaths = [snapshotDir </> " bin" , localInstallDir </> " bin" ]
114114 let origPaths = removePathsContaining cacheBinPaths paths
You can’t perform that action at this time.
0 commit comments