Skip to content

Conversation

@antongolub
Copy link
Collaborator

@antongolub antongolub commented Mar 1, 2025

closes #999
closes #1112

const _$ = $({ prefix: '', postfix: '' })
const p1 = _$`echo ${['-n', 'foo']}`
assert.equal(p1.cmd, 'echo -n foo')
assert.equal((await p1).toString(), 'foo')

const p2 = _$`echo ${[1, '', '*', '2']}`
assert.equal(p2.cmd, `echo 1 $'' $'*' 2`)
assert.equal((await p2).toString(), `1  * 2\n`)
  • Tests pass
  • Appropriate changes to README are included in PR

@antongolub antongolub requested a review from antonmedv March 1, 2025 16:42
@antonmedv antonmedv merged commit eff2d70 into google:main Mar 1, 2025
24 checks passed
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 this pull request may close these issues.

Empty string incorrectly not quoted in an array

2 participants