Call Bupstash once for each item to delete.
By calling Bupstash once for each item to delete we avoid having to
pipe in a list of IDs through stdin. Piping ID lists in through stdin
has proven unreliable, keeping Bupstash waiting for the end of file
marker indefinitely in some cases.
Change-Id: Id9a2a9f9e88260882a7de08554d667f02db54673
diff --git a/src/Mulkup/Bupstash.hs b/src/Mulkup/Bupstash.hs
index 8804593..22ae70e 100644
--- a/src/Mulkup/Bupstash.hs
+++ b/src/Mulkup/Bupstash.hs
@@ -79,7 +79,8 @@
return x
BupRemove ids -> do
- procs "bupstash" ["rm", "--ids-from-stdin"] (select (map unsafeTextToLine ids))
+ forM_ ids $ \id' -> do
+ procs "bupstash" ["rm", labelArg ("id", id')] empty
where
getHost :: Member (Reader MulkupConfig) r => Sem r Text