mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
fix: on error, reset spawnedProcess (#41033)
reset spawnedProcess instance in case of error
This commit is contained in:
committed by
GitHub
parent
4164ef93ad
commit
a05bfd332d
@@ -38,6 +38,8 @@ const spawnUpdate = async function (args: string[], options: { detached: boolean
|
|||||||
spawnedProcess.stderr.on('data', (data) => { stderr += data; });
|
spawnedProcess.stderr.on('data', (data) => { stderr += data; });
|
||||||
|
|
||||||
spawnedProcess.on('error', (error) => {
|
spawnedProcess.on('error', (error) => {
|
||||||
|
spawnedProcess = undefined;
|
||||||
|
spawnedArgs = [];
|
||||||
reject(error);
|
reject(error);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user