Skip to content

Commit 4171584

Browse files
revert stopwatch back
Signed-off-by: Aramis Sennyey <aramissennyeydd@users.noreply.github.com>
1 parent 452be87 commit 4171584

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libraries/rush-lib/src/logic/operations/OperationExecutionRecord.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,18 +320,21 @@ export class OperationExecutionRecord implements IOperationRunnerContext, IOpera
320320
? OperationStatus.NoOp
321321
: OperationStatus.Skipped;
322322
}
323+
// Make sure that the stopwatch is stopped before reporting the result, otherwise endTime is undefined.
324+
this.stopwatch.stop();
323325
// Delegate global state reporting
324326
await onResult(this);
325327
} catch (error) {
326328
this.status = OperationStatus.Failure;
327329
this.error = error;
330+
// Make sure that the stopwatch is stopped before reporting the result, otherwise endTime is undefined.
331+
this.stopwatch.stop();
328332
// Delegate global state reporting
329333
await onResult(this);
330334
} finally {
331335
if (this.isTerminal) {
332336
this._collatedWriter?.close();
333337
this.stdioSummarizer.close();
334-
this.stopwatch.stop();
335338
}
336339
}
337340
}

0 commit comments

Comments
 (0)