diff --git a/src/index.ts b/src/index.ts index c8ab59e..5e76004 100644 --- a/src/index.ts +++ b/src/index.ts @@ -33,14 +33,11 @@ export class DeferedSpawn extends Emittery { } async waitForNextData(): Promise { - console.log("waiting for next data from", this.process.spawnargs.join(" ")); return new Promise((resolve, reject) => { this.on("data", (data) => { - console.log("got answer from process", this.process.spawnfile); resolve(data.toString("utf-8")); }); this.on("error", (err) => { - console.error("Rejecting from process", this.process.spawnfile, err); reject(err); }); this.on("end", () => resolve(null)); @@ -83,13 +80,13 @@ export function deferedSpawn( err += data.toString("utf-8"); }); process.on("spawn", () => { + spawned = true; resolve(emitter); }); process.on("close", (code) => { if (!spawned) { reject(err); } else { - console.log("!!!!!!!!!!!!!!!!!!!! PROCESS CLOSED"); if (code === 0) { emitter.emit("success", output); } else {