Replies: 1 comment
-
|
I would also love to be able to access the command in non-failing executions. const args = ['a', 'b c']
const execPromise = Bun.$`echo ${args}`.quiet()
console.write(`${execPromise.command} → `)
const execResult = await execPromise
console.log(execResult.text()) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
First off, Bun's shell tools are awesome, props to building a great API here!
One nice to have: include the failed command as a
ShellErrorproperty. Right now when I'm reporting aShellErrorto Sentry, I extract stdout, stderr to include as error context. It'd be really nice to be able to include the original command as well. I realize I can look at the source, but the source changes w/ time and it'd be nice to have a definitive string for the shell command that produced the exit code, especially in the case of dynamically-constructed shell commands.e.g.
ShellError.commandor something to that effect.Beta Was this translation helpful? Give feedback.
All reactions