summaryrefslogtreecommitdiff
path: root/Remote/BitTorrent.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-04-04 14:34:03 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-04-04 14:34:03 -0400
commit092e6b0f3f61ad3ede912a00bbbeb635ab9bc267 (patch)
tree57107e1a0aaedd9ceff8c4ec33ad1a8fffc6852a /Remote/BitTorrent.hs
parentb3b8a1cdfdc583159c117ebe76e3c6a4eb57114b (diff)
well along the way to fully quiet --quiet
Came up with a generic way to filter out progress messages while keeping errors, for commands that use stderr for both. --json mode will disable command outputs too.
Diffstat (limited to 'Remote/BitTorrent.hs')
-rw-r--r--Remote/BitTorrent.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Remote/BitTorrent.hs b/Remote/BitTorrent.hs
index 27844c262..2770f30ae 100644
--- a/Remote/BitTorrent.hs
+++ b/Remote/BitTorrent.hs
@@ -289,15 +289,15 @@ ariaParams ps = do
return (ps ++ opts)
runAria :: [CommandParam] -> Annex Bool
-runAria ps = liftIO . boolSystem "aria2c" =<< ariaParams ps
+runAria ps = progressCommand "aria2c" =<< ariaParams ps
-- Parse aria output to find "(n%)" and update the progress meter
-- with it.
ariaProgress :: Maybe Integer -> MeterUpdate -> [CommandParam] -> Annex Bool
ariaProgress Nothing _ ps = runAria ps
ariaProgress (Just sz) meter ps = do
- h <- mkProgressHandler meter
- liftIO . commandMeter (parseAriaProgress sz) h "aria2c"
+ oh <- mkOutputHandler
+ liftIO . commandMeter (parseAriaProgress sz) oh meter "aria2c"
=<< ariaParams ps
parseAriaProgress :: Integer -> ProgressParser