glacier: Fix pipe setup when calling glacier-cli to retrieve an object.

This commit is contained in:
Joey Hess 2014-10-20 15:11:01 -04:00
parent f23598fe48
commit fced322834
4 changed files with 28 additions and 1 deletions

View file

@ -141,7 +141,10 @@ retrieve r k sink = go =<< glacierEnv c u
]
go Nothing = error "cannot retrieve from glacier"
go (Just e) = do
let cmd = (proc "glacier" (toCommand params)) { env = Just e }
let cmd = (proc "glacier" (toCommand params))
{ env = Just e
, std_out = CreatePipe
}
(_, Just h, _, pid) <- liftIO $ createProcess cmd
-- Glacier cannot store empty files, so if the output is
-- empty, the content is not available yet.