get: Improve output when failing to get a file fails

showTriedRemotes lists the remotes it tried to access. So there's
no need to list those again in "Try making some of these remotes
available".
This commit is contained in:
Joey Hess 2021-01-29 15:11:19 -04:00
parent 7e9617ef47
commit 8d4eb2d34e
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
3 changed files with 5 additions and 3 deletions

View file

@ -92,7 +92,7 @@ getKey' key afile = dispatch
where
dispatch [] = do
showNote "not available"
showlocs
showlocs []
return False
dispatch remotes = notifyTransfer Download afile $ \witness -> do
ok <- pickRemote remotes $ \r -> ifM (probablyPresent r)
@ -103,9 +103,9 @@ getKey' key afile = dispatch
then return ok
else do
Remote.showTriedRemotes remotes
showlocs
showlocs (map Remote.uuid remotes)
return False
showlocs = Remote.showLocations False key []
showlocs exclude = Remote.showLocations False key exclude
"No other repository is known to contain the file."
-- This check is to avoid an ugly message if a remote is a
-- drive that is not mounted.