From 7abf8eedd5f531793ebe46575bf5b0c1977fb509 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 14 May 2021 16:19:28 -1000 Subject: [PATCH] ;tools: Shake cabalfiles: fix with stack 1.7 (now does a full build) --- Shake.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Shake.hs b/Shake.hs index ba3dee342..4d7160a95 100755 --- a/Shake.hs +++ b/Shake.hs @@ -254,7 +254,10 @@ main = do -- stack can fail to update cabal files with zero exit status, -- so we need to to check stderr, and specifically for the error message -- since all output goes there - err <- fromStderr <$> (cmd Shell "stack build --dry-run" :: Action (Stderr String)) + err <- fromStderr <$> + -- stack 1.7 no longer updates cabal files with --dry-run, must do a full build + -- (or use hpack, of similar version) + (cmd Shell "stack build" :: Action (Stderr String)) when ("was generated with a newer version of hpack" `isInfixOf` err) $ liftIO $ putStr err >> exitFailure when commit $ do