Skip to content

Commit

Permalink
Have "stack script" set import search path #3377
Browse files Browse the repository at this point in the history
  • Loading branch information
mgsloan committed Jan 25, 2019
1 parent 570172b commit dac3359
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/Stack/Script.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@ import qualified RIO.Text as T
scriptCmd :: ScriptOpts -> GlobalOpts -> IO ()
scriptCmd opts go' = do
file <- resolveFile' $ soFile opts
let go = go'
let scriptDir = parent file
go = go'
{ globalConfigMonoid = (globalConfigMonoid go')
{ configMonoidInstallGHC = First $ Just True
}
, globalStackYaml = SYLNoConfig $ parent file
, globalStackYaml = SYLNoConfig scriptDir
}
withDefaultBuildConfigAndLock go $ \lk -> do
-- Some warnings in case the user somehow tries to set a
Expand Down Expand Up @@ -92,7 +93,8 @@ scriptCmd opts go' = do
withNewLocalBuildTargets targets $ Stack.Build.build Nothing lk

let ghcArgs = concat
[ ["-hide-all-packages"]
[ ["-i", "-i" ++ toFilePath scriptDir]
, ["-hide-all-packages"]
, maybeToList colorFlag
, map (\x -> "-package" ++ x)
$ Set.toList
Expand Down

0 comments on commit dac3359

Please sign in to comment.