on master help sign in
Improve missing upstream error

by displaying available upstreams when the requested one is not found

commita55abddc9f4c2aed8eb179a74f94296bd3127fb6 authorLuigy Leon <luigy@outlook.com> dateMon 14 May 2018, 18:47 (8 years ago) parent3e242d6
1 file changed+1−1
lib/command/src/Obelisk/Command/Thunk.hs+1−1
lib/command/src/Obelisk/Command/Thunk.hs+1−1
@@ -546,7 +546,7 @@ getThunkPtr thunkDir upstream = do
546546 remotes <- lines <$> readProcess "hub" [ "-C", thunkDir, "remote" ] ""
547547 --Check that the upstream specified actually exists
548548 case L.find (== upstream) remotes of
549− Nothing -> failWith $ T.pack $ "thunk pack: upstream " <> upstream <> " does not exist"
549+ Nothing -> failWith $ T.pack $ "thunk pack: upstream " <> upstream <> " does not exist. Available upstreams are " <> L.intercalate ", " remotes
550550 Just _ -> return ()
551551 -- iterate over cartesian product
552552 forM_ repoHeads $ \hd -> do