Skip to content

Commit

Permalink
Merge pull request #6261 from commercialhaskell/fix-upgrade-err
Browse files Browse the repository at this point in the history
Fix stack upgrade warning message
  • Loading branch information
mpilgrem authored Sep 29, 2023
2 parents c327a48 + d9ccbd2 commit 267df9d
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Stack/Upgrade.hs
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,13 @@ upgrade builtHash (UpgradeOpts mbo mso) = case (mbo, mso) of
-- See #2977 - if --git or --git-repo is specified, do source upgrade.
(_, Just so@(SourceOpts (Just _))) -> source so
(Just bo, Just so) -> binary bo `catchAny` \e -> do
prettyWarnL
[ flow "Exception occurred when trying to perform binary upgrade:"
, fromString . show $ e
, line <> flow "Falling back to source upgrade."
]
prettyWarn $
flow "When trying to perform binary upgrade, Stack encountered the \
\following error:"
<> blankLine
<> ppException e
<> blankLine
<> flow "Falling back to source upgrade."
source so
where
binary = binaryUpgrade
Expand Down

0 comments on commit 267df9d

Please sign in to comment.