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);
|
||||
}
|
||||
|
||||
const compileResult = await Bun.spawn([
|
||||
const compileResult = Bun.spawn([
|
||||
"bun",
|
||||
"build",
|
||||
"--compile",
|
||||
@ -63,8 +63,9 @@ const compileResult = await Bun.spawn([
|
||||
stderr: "inherit",
|
||||
});
|
||||
|
||||
if (compileResult.exitCode !== 0) {
|
||||
process.exit(compileResult.exitCode ?? 1);
|
||||
const exitCode = await compileResult.exited;
|
||||
if (exitCode !== 0) {
|
||||
process.exit(exitCode);
|
||||
}
|
||||
|
||||
console.log(`Linux binary written to ${outputFile}`);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user