Abiword: Avoid calling `stdoutCallback` multiple times
parent
c208d50c4a
commit
0233399fdf
|
@ -55,7 +55,10 @@ if (os.type().indexOf('Windows') > -1) {
|
|||
abiword.stderr.on('data', (data) => { stdoutBuffer += data.toString(); });
|
||||
abiword.on('exit', (code) => {
|
||||
spawnAbiword();
|
||||
if (stdoutCallback != null) stdoutCallback(new Error(`Abiword died with exit code ${code}`));
|
||||
if (stdoutCallback != null) {
|
||||
stdoutCallback(new Error(`Abiword died with exit code ${code}`));
|
||||
stdoutCallback = null;
|
||||
}
|
||||
});
|
||||
abiword.stdout.on('data', (data) => {
|
||||
stdoutBuffer += data.toString();
|
||||
|
|
Loading…
Reference in New Issue