Update backend process spawning in Electron by adding error handling for failed process initiation and allow overriding the Python command in the build script for cross-platform compatibility.
Some checks failed
CI / test-backend (push) Successful in 4s
OSV-Scanner Scheduled Scan / scan-scheduled (push) Successful in 10s
CI / lint (push) Successful in 9m42s
CI / build-frontend (push) Successful in 9m49s
CI / test-lang (push) Successful in 9m45s
Tests / test (push) Successful in 13m18s
Build Test / Build and Test (push) Failing after 32m38s
Some checks failed
CI / test-backend (push) Successful in 4s
OSV-Scanner Scheduled Scan / scan-scheduled (push) Successful in 10s
CI / lint (push) Successful in 9m42s
CI / build-frontend (push) Successful in 9m49s
CI / test-lang (push) Successful in 9m45s
Tests / test (push) Successful in 13m18s
Build Test / Build and Test (push) Failing after 32m38s
This commit is contained in:
@@ -539,11 +539,15 @@ app.whenReady().then(async () => {
|
||||
}
|
||||
|
||||
// spawn executable
|
||||
exeChildProcess = await spawn(exe, [
|
||||
exeChildProcess = spawn(exe, [
|
||||
...requiredArguments, // always provide required arguments
|
||||
...userProvidedArguments, // also include any user provided arguments
|
||||
]);
|
||||
|
||||
if (!exeChildProcess || !exeChildProcess.pid) {
|
||||
throw new Error("Failed to start backend process (no PID).");
|
||||
}
|
||||
|
||||
// log stdout
|
||||
var stdoutLines = [];
|
||||
exeChildProcess.stdout.setEncoding("utf8");
|
||||
|
||||
Reference in New Issue
Block a user