Skip to content

refactor: enhance nothrow option#1108

Merged
antonmedv merged 1 commit intogoogle:mainfrom
antongolub:enhance-nothrow
Feb 23, 2025
Merged

refactor: enhance nothrow option#1108
antonmedv merged 1 commit intogoogle:mainfrom
antongolub:enhance-nothrow

Conversation

@antongolub
Copy link
Collaborator

@antongolub antongolub commented Feb 23, 2025

const err = new Error('BrokenSpawn')
const o2 = await $({
  nothrow: true,
  spawn() {
    throw err
  },
})`echo foo`
assert.equal(o2.ok, false)
assert.equal(o2.exitCode, null)
assert.match(o2.message, /BrokenSpawn/)
assert.equal(o2.cause, err)
  • Tests pass
  • Appropriate changes to README are included in PR

@antonmedv antonmedv merged commit 1ef794a into google:main Feb 23, 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.

2 participants