Skip to content

Commit

Permalink
Only run "cabal copy" if there are exes or lib #2862
Browse files Browse the repository at this point in the history
  • Loading branch information
mgsloan committed Feb 1, 2017
1 parent 1020a2f commit 666632f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Stack/Build/Execute.hs
Expand Up @@ -1306,7 +1306,8 @@ singleBuild runInBase ac@ActionContext {..} ee@ExecuteEnv {..} task@Task {..} in
cabal False (concat [["haddock", "--html", "--hoogle", "--html-location=../$pkg-$version/"]
,sourceFlag, ["--internal" | boptsHaddockInternal eeBuildOpts]])

unless isFinalBuild $ withMVar eeInstallLock $ \() -> do
let shouldCopy = not isFinalBuild && (packageHasLibrary package || not (Set.null (packageExes package)))
when shouldCopy $ withMVar eeInstallLock $ \() -> do
announce "copy/register"
eres <- try $ cabal False ["copy"]
case eres of
Expand Down

0 comments on commit 666632f

Please sign in to comment.