Skip to content

Is there a way to pass argument without escaping with bunshell? #17045

Closed Answered by RiskyMH
aca asked this question in Q&A
Discussion options

You must be logged in to vote

see https://bun.sh/docs/runtime/shell#escape-escape-strings

import { $ } from "bun";

await $`echo ${{ raw: '$(foo) `bar` "baz"' }}`;
// => bun: command not found: foo
// => bun: command not found: bar
// => baz

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RiskyMH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants