From 07927ebf6ae206f02c5cfb837e725761feb671eb Mon Sep 17 00:00:00 2001 From: Alfredo Di Napoli Date: Tue, 21 Jul 2015 14:07:53 +0200 Subject: [PATCH] Fix after review (bash_ uses run_) --- src/Shelly.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Shelly.hs b/src/Shelly.hs index a55d37c..838a967 100644 --- a/src/Shelly.hs +++ b/src/Shelly.hs @@ -1058,7 +1058,9 @@ bash fp args = escaping False $ do run "bash" ["-c", "'set -o pipefail && " <> sanitise (toTextIgnore fp : args) <> "'"] bash_ :: FilePath -> [Text] -> Sh () -bash_ fp args = const () <$> bash fp args +bash_ fp args = escaping False $ do + let sanitise = T.replace "'" "\'" . T.intercalate " " + run_ "bash" ["-c", "'set -o pipefail && " <> sanitise (toTextIgnore fp : args) <> "'"] -- | bind some arguments to run for re-use. Example: --