Skip to content

Commit 423ef64

Browse files
committed
fix: improve err capture
1 parent 6f7152b commit 423ef64

File tree

2 files changed

+2
-57
lines changed

2 files changed

+2
-57
lines changed

disabled.travis.yml

-55
This file was deleted.

src/main/ts/util.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ export const invoke = ({
4343
const result = cp.spawnSync(_cmd, _args, { cwd, stdio })
4444

4545
if (result.error || result.status) {
46-
throw Object.assign(new Error(result.stderr.toString().trim()), result)
46+
throw Object.assign(new Error(result.stderr?.toString?.().trim()), result)
4747
}
4848

49-
return result.stdout?.toString().trim() ?? result.stdout
49+
return result.stdout?.toString?.().trim() ?? result.stdout
5050
}
5151

5252
const checkValue = (

0 commit comments

Comments
 (0)