mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: on error, reset spawnedProcess (#41110)
reset spawnedProcess instance in case of error Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Maikel Ortega Hernandez <maikeloh@gmail.com>
This commit is contained in:
@@ -38,6 +38,8 @@ const spawnUpdate = async function (args: string[], options: { detached: boolean
|
||||
spawnedProcess.stderr.on('data', (data) => { stderr += data; });
|
||||
|
||||
spawnedProcess.on('error', (error) => {
|
||||
spawnedProcess = undefined;
|
||||
spawnedArgs = [];
|
||||
reject(error);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user