diff --git a/src/svnFinder.ts b/src/svnFinder.ts index 99448575..835fe2c7 100644 --- a/src/svnFinder.ts +++ b/src/svnFinder.ts @@ -104,7 +104,7 @@ export class SvnFinder { child.stdout.on("data", (b: Buffer) => buffers.push(b)); child.on("error", cpErrorHandler(e)); child.on( - "exit", + "close", code => code ? e(new Error("Not found")) @@ -127,7 +127,7 @@ export class SvnFinder { child.stdout.on("data", (b: Buffer) => buffers.push(b)); child.on("error", cpErrorHandler(e)); child.on( - "exit", + "close", code => code || Buffer.concat(buffers).toString("utf8").length < 100 ? e(new Error("Not found"))