Skip to content

Commit

Permalink
fixed infite loop on cleartool error (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
fr43nk authored Sep 3, 2024
1 parent 2d9653d commit 45fd0c2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/clearcase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ export class ClearCase {

let allData: Buffer = Buffer.alloc(0);
let cmdErrMsg = "";
return new Promise<void>(resolveFct => {
return new Promise<void>((resolve, reject) => {
command.stdout.on("data", data => {
let res = "";
if (Buffer.isBuffer(data)) {
Expand All @@ -1014,11 +1014,12 @@ export class ClearCase {
}
if (code !== 0 && this.isView && cmdErrMsg !== "") {
window.showErrorMessage(`${cmdErrMsg}`, { modal: false });
reject();
}
if (typeof onFinished === "function") {
onFinished(code, allData.toString(), cmdErrMsg);
}
resolveFct();
resolve();
});
});
}
Expand Down

0 comments on commit 45fd0c2

Please sign in to comment.