Skip to content

Commit

Permalink
Recover diff targets building with stack
Browse files Browse the repository at this point in the history
  • Loading branch information
jneira committed Feb 9, 2020
1 parent 9aacbba commit 88accca
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/Distribution/Helper.hs
Original file line number Diff line number Diff line change
Expand Up @@ -518,15 +518,16 @@ buildProjectTarget qe mu stage = do
} -> do
let projdir = plStackProjectDir qeProjLoc
let workdir_opts = Stack.workdirArg qe
let opts = workdir_opts ++
[ "--stack-yaml="++plStackYaml, "build", "."
, "--test", "--bench", "--no-run-tests", "--no-run-benchmarks"
] ++ stage_opts
let opts target =
workdir_opts ++
[ "--stack-yaml="++plStackYaml, "build", target
, "--test", "--bench", "--no-run-tests", "--no-run-benchmarks"
] ++ stage_opts
case mu of
Just Unit{uPackage=Package{pSourceDir}} ->
Stack.callStackCmd qe (Just pSourceDir) opts
Stack.callStackCmd qe (Just pSourceDir) (opts ".")
Nothing ->
Stack.callStackCmd qe (Just projdir) opts
Stack.callStackCmd qe (Just projdir) (opts "")

getFileModTime :: FilePath -> IO (FilePath, EpochTime)
getFileModTime f = do
Expand Down

0 comments on commit 88accca

Please sign in to comment.