Skip to content

Commit 22612b8

Browse files
committed
Minor tidy-up of stack upgrade messages
1 parent dc373d4 commit 22612b8

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

src/Stack/Upgrade.hs

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -190,30 +190,36 @@ binaryUpgrade (BinaryOpts mplatform force' mver morg mrepo) =
190190
isNewer <-
191191
case mdownloadVersion of
192192
Nothing -> do
193-
prettyErrorL $
194-
flow "Unable to determine upstream version from GitHub metadata"
195-
:
196-
[ line <> flow "Rerun with --force-download to force an upgrade"
197-
| not force]
193+
prettyError $
194+
flow "Unable to determine upstream version from GitHub metadata."
195+
<> if force
196+
then mempty
197+
else
198+
line
199+
<> fillSep
200+
[ flow "Rerun with"
201+
, style Shell "--force-download"
202+
, flow "to force an upgrade."
203+
]
198204
pure False
199205
Just downloadVersion -> do
200206
prettyInfoL
201207
[ flow "Current Stack version:"
202208
, fromString (versionString stackVersion) <> ","
203209
, flow "available download version:"
204-
, fromString (versionString downloadVersion)
210+
, fromString (versionString downloadVersion) <> "."
205211
]
206212
pure $ downloadVersion > stackVersion
207213
toUpgrade <- case (force, isNewer) of
208214
(False, False) -> do
209215
prettyInfoS "Skipping binary upgrade, you are already running the most \
210-
\recent version"
216+
\recent version."
211217
pure False
212218
(True, False) -> do
213-
prettyInfoS "Forcing binary upgrade"
219+
prettyInfoS "Forcing binary upgrade."
214220
pure True
215221
(_, True) -> do
216-
prettyInfoS "Newer version detected, downloading"
222+
prettyInfoS "Newer version detected, downloading."
217223
pure True
218224
when toUpgrade $ do
219225
config <- view configL

0 commit comments

Comments
 (0)