chore: import upstream snapshot with attribution

This commit is contained in:
wehub-resource-sync
2026-07-13 12:47:58 +08:00
commit b16403ea71
789 changed files with 115226 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
import { CommandHandle, CommandExitError } from '../src/index.js'
import { assert } from 'vitest'
export function catchCmdExitErrorInBackground(cmd: CommandHandle) {
let disabled = false
cmd.wait().catch((res: CommandExitError) => {
if (!disabled) {
assert.equal(
res.exitCode,
0,
`command failed with exit code ${res.exitCode}: ${res.stderr}`
)
}
})
return () => {
disabled = true
}
}