mirror of
https://github.com/commercialhaskell/stackage.git
synced 2026-02-27 21:47:56 +01:00
Give a bit more information on upload progress
This commit is contained in:
parent
ff41a4f8d5
commit
3982eee037
@ -67,7 +67,10 @@ uploadBundle UploadBundle {..} man = do
|
|||||||
}
|
}
|
||||||
res <- httpLbs req3 man
|
res <- httpLbs req3 man
|
||||||
case lookup "x-stackage-ident" $ responseHeaders res of
|
case lookup "x-stackage-ident" $ responseHeaders res of
|
||||||
Just snapid -> return $ SnapshotIdent $ decodeUtf8 snapid
|
Just snapid -> do
|
||||||
|
forM_ (lookup "location" $ responseHeaders res) $ \loc ->
|
||||||
|
putStrLn $ "Check upload progress at: " ++ decodeUtf8 loc
|
||||||
|
return $ SnapshotIdent $ decodeUtf8 snapid
|
||||||
Nothing -> error $ "An error occurred: " ++ show res
|
Nothing -> error $ "An error occurred: " ++ show res
|
||||||
where
|
where
|
||||||
params = mapMaybe (\(x, y) -> (x, ) <$> y)
|
params = mapMaybe (\(x, y) -> (x, ) <$> y)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user