shh 0.7.1.3 → 0.7.1.4
raw patch · 4 files changed
+15/−4 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- ChangeLog.md +9/−0
- shh.cabal +1/−1
- src/Shh/Internal.hs +2/−3
- test/Test.hs +3/−0
ChangeLog.md view
@@ -1,5 +1,14 @@ # Revision history for shh +## 0.7.1.4 -- 2021-06-30++* Fix a bug where `|>` was too strict, causing SIGPIPE+ to be triggered (ResourceVanished).++## 0.7.1.3 -- 2021-06-30++* Expose the ToFilePath class.+ ## 0.7.1.2 -- 2021-06-30 * Remove assumptions introduced in 0.7.1.0 about UTF-8. Arbitrary filenames
shh.cabal view
@@ -1,5 +1,5 @@ name: shh-version: 0.7.1.3+version: 0.7.1.4 synopsis: Simple shell scripting from Haskell description: Provides a shell scripting environment for Haskell. It helps you use external binaries, and allows you to
src/Shh/Internal.hs view
@@ -140,7 +140,6 @@ b' = b r o e `finally` (hClose r) concurrently a' b' - -- | Like @`pipe`@, but plumbs stderr. See the warning in @`pipe`@. pipeErr :: Shell f => Proc a -> Proc b -> f (a, b) pipeErr (Proc a) (Proc b) = buildProc $ \i o e -> do@@ -169,7 +168,7 @@ (|>) :: Shell f => Proc a -> Proc b -> f b a |> b = runProc $ do v <- fmap snd (a `pipe` b)- pure $! v+ pure v infixl 1 |> @@ -188,7 +187,7 @@ (|!>) :: Shell f => Proc a -> Proc b -> f b a |!> b = runProc $ do v <- fmap snd (a `pipeErr` b)- pure $! v+ pure v infixl 1 |!> -- | Things that can be converted to a @`FilePath`@.
test/Test.hs view
@@ -121,6 +121,9 @@ , testCase "Long pipe" $ do r <- echo "test" |> tr "-d" "e" |> tr "-d" "s" |> capture r @?= "tt\n"+ , testCase "SIGPIPE nativeProc" $ do+ r <- pureProc (\_ -> BS.cycle "y\n") |> pureProc (\_ -> BS.cycle "y\n") |> exitCode (exe "true")+ r @?= 0 , testCase "Pipe stderr" $ replicateM_ 100 $ do r <- echo "test" &> StdErr |!> cat |> capture r @?= "test\n"