fix: on error, reset spawnedProcess (#41111)

fix: on error, reset spawnedProcess (#41033)

reset spawnedProcess instance in case of error

Co-authored-by: Maikel Ortega Hernández <maikeloh@gmail.com>
This commit is contained in:
Charles Kerr
2024-01-24 20:30:50 -06:00
committed by GitHub
parent b12e04eda0
commit 33057eb8d4

View File

@@ -50,6 +50,8 @@ const spawnUpdate = function (args: string[], detached: boolean, callback: Funct
errorEmitted = false;
spawnedProcess.on('error', (error) => {
errorEmitted = true;
spawnedProcess = undefined;
spawnedArgs = [];
callback(error);
});