Skip to content

Commit b9a9632

Browse files
committed
relay exit status from cargo command
1 parent 1ba257d commit b9a9632

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/prebuild.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,12 @@ function compile(...args){
128128
else if (isFallback) console.log("\nAttempting to rebuild locally...")
129129
else console.warn(`cargo build ${[optimization, features].filter(s=>s).join(' ')}`)
130130

131-
child_process.spawnSync(
131+
let {status} = child_process.spawnSync(
132132
`cargo-cp-artifact -nc ${BINARY_PATH} -- cargo build --message-format=json-render-diagnostics ${optimization} ${features}`,
133133
{shell:true, stdio:'inherit'}
134134
)
135+
136+
process.exit(status)
135137
}
136138

137139
async function usage(){

0 commit comments

Comments
 (0)