Refactor Linux binary build script for improved exit code handling
Some checks failed
farmcontrol/farmcontrol-server/pipeline/head There was a failure building this commit
Some checks failed
farmcontrol/farmcontrol-server/pipeline/head There was a failure building this commit
- Updated the exit code handling in the Linux binary build script to use the `exited` property from the compile result. - Simplified the process of exiting the script on failure, enhancing clarity and reliability.
This commit is contained in:
parent
b2db8f0aa0
commit
bb538fe454
@ -49,7 +49,7 @@ if (!result.success) {
|
|||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
const compileResult = await Bun.spawn([
|
const compileResult = Bun.spawn([
|
||||||
"bun",
|
"bun",
|
||||||
"build",
|
"build",
|
||||||
"--compile",
|
"--compile",
|
||||||
@ -63,8 +63,9 @@ const compileResult = await Bun.spawn([
|
|||||||
stderr: "inherit",
|
stderr: "inherit",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (compileResult.exitCode !== 0) {
|
const exitCode = await compileResult.exited;
|
||||||
process.exit(compileResult.exitCode ?? 1);
|
if (exitCode !== 0) {
|
||||||
|
process.exit(exitCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`Linux binary written to ${outputFile}`);
|
console.log(`Linux binary written to ${outputFile}`);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user