This repository was archived by the owner on Oct 7, 2020. It is now read-only.
File tree 2 files changed +6
-6
lines changed 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ execCabal_ :: [String] -> Action ()
24
24
execCabal_ = execCabalWithOriginalPath
25
25
26
26
execCabalWithOriginalPath :: CmdResult r => [String ] -> Action r
27
- execCabalWithOriginalPath = withOriginalPath . (command [] " cabal" )
27
+ execCabalWithOriginalPath = withoutStackCachedBinaries . (command [] " cabal" )
28
28
29
29
cabalBuildData :: Action ()
30
30
cabalBuildData = do
@@ -77,7 +77,7 @@ cabalInstallHie versionNumber = do
77
77
installCabalWithStack :: Action ()
78
78
installCabalWithStack = do
79
79
-- try to find existing `cabal` executable with appropriate version
80
- mbc <- withOriginalPath (liftIO (findExecutable " cabal" ))
80
+ mbc <- withoutStackCachedBinaries (liftIO (findExecutable " cabal" ))
81
81
82
82
case mbc of
83
83
Just c -> do
Original file line number Diff line number Diff line change @@ -99,16 +99,16 @@ stackBuildFailMsg =
99
99
++ " If this does not work, open an issue at \n "
100
100
++ " \t https://github.com/haskell/haskell-ide-engine"
101
101
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
105
105
mbPath <- liftIO (lookupEnv " PATH" )
106
106
107
107
case (mbPath, isRunFromStack) of
108
108
109
109
(Just paths, True ) -> do
110
110
snapshotDir <- trimmedStdout <$> execStackShake [" path" , " --snapshot-install-root" ]
111
- localInstallDir <- trimmedStdout <$> execStackShake [" path" , " --local-install-dir " ]
111
+ localInstallDir <- trimmedStdout <$> execStackShake [" path" , " --local-install-root " ]
112
112
113
113
let cacheBinPaths = [snapshotDir </> " bin" , localInstallDir </> " bin" ]
114
114
let origPaths = removePathsContaining cacheBinPaths paths
You can’t perform that action at this time.
0 commit comments