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

Doesn't quote empty strings on Unix #4

Open
chocolateboy opened this issue Feb 25, 2020 · 2 comments · May be fixed by #5
Open

Doesn't quote empty strings on Unix #4

chocolateboy opened this issue Feb 25, 2020 · 2 comments · May be fixed by #5

Comments

@chocolateboy
Copy link

(via)

const test = str => console.log('[' + shellEscape(str) + ']')

test("foo") // => [foo] ✔
test(" ")   // => [' '] ✔
test("")    // => []    ?
@chocolateboy chocolateboy changed the title Doesn't quote empty strings Doesn't quote empty strings on Unix Feb 25, 2020
@chocolateboy
Copy link
Author

It works fine on Windows:

test("foo") // => [foo] ✔
test(" ")   // => [" "] ✔
test("")    // => [""]  ✔

chocolateboy added a commit to chocolateboy/any-shell-escape that referenced this issue Feb 25, 2020
fixes boazy#4

before:

    shellEscape("") // => ""

after:

    shellEscape("") // => "''"
@chocolateboy chocolateboy linked a pull request Feb 25, 2020 that will close this issue
@chocolateboy
Copy link
Author

chocolateboy commented Feb 29, 2020

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

Successfully merging a pull request may close this issue.

1 participant