fix: on error, reset spawnedProcess (#41033)

reset spawnedProcess instance in case of error
This commit is contained in:
Maikel Ortega Hernández 2024-01-24 17:45:08 -05:00 committed by GitHub
parent 4164ef93ad
commit a05bfd332d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
});