Improve the "Try making some of these repositories available" message

With some hints for the user for what to do.

Took care to avoid changing the json output. It would have been ok to add
the new separated lists to it, in addition to the old list, but I didn't
do that because I didn't see much point.
This commit is contained in:
Joey Hess 2020-09-22 14:10:30 -04:00
parent 5cfcf1f05f
commit 6a5e0cbfc7
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 48 additions and 16 deletions

View file

@ -45,6 +45,7 @@ module Messages (
disableDebugOutput,
debugEnabled,
commandProgressDisabled,
jsonOutputEnabled,
outputMessage,
withMessageState,
prompt,
@ -288,6 +289,12 @@ commandProgressDisabled = withMessageState $ \s -> return $
JSONOutput _ -> True
NormalOutput -> concurrentOutputEnabled s
jsonOutputEnabled :: Annex Bool
jsonOutputEnabled = withMessageState $ \s -> return $
case outputType s of
JSONOutput _ -> True
_ -> False
{- Prevents any concurrent console access while running an action, so
- that the action is the only thing using the console, and can eg prompt
- the user.