Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency between what is displayed and what is being executed #161

Open
qwfy opened this issue Dec 12, 2017 · 1 comment
Open

Inconsistency between what is displayed and what is being executed #161

qwfy opened this issue Dec 12, 2017 · 1 comment

Comments

@qwfy
Copy link
Contributor

qwfy commented Dec 12, 2017

The following code

{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ExtendedDefaultRules #-}
{-# OPTIONS_GHC -fno-warn-type-defaults #-}

import Shelly
import qualified Data.Text as T
import qualified System.IO

default (T.Text)

main = do
    System.IO.hSetBuffering System.IO.stdout System.IO.LineBuffering
    shelly $ verbosely $ do
        escaping False $ run "echo" ["He says: \"huh?\""]
        escaping True  $ run "echo" ["He says: \"huh?\""]

outputs:

echo 'He says: "huh?"'
He says: huh?
echo 'He says: "huh?"'
He says: "huh?"

verbosely says that they will do the same thing, (echo 'He says: "huh?"'), but they are not.

@gregwebs
Copy link
Owner

Yeah, the command printer does not take into account the escaping setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants