fix: on error, reset spawnedProcess (#41033)
reset spawnedProcess instance in case of error
This commit is contained in:
parent
4164ef93ad
commit
a05bfd332d
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue