Skip to content

Commit

Permalink
Merge pull request #4577 from kamontat/patch-1
Browse files Browse the repository at this point in the history
[heft] Fix MetricsCollector has not been initialized with setStartTime() yet when run clean
  • Loading branch information
iclanton authored Mar 14, 2024
2 parents f40468e + 02742fe commit ba823b5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/heft/src/cli/actions/CleanAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ export class CleanAction extends CommandLineAction implements IHeftAction {
const { heftConfiguration } = this._internalHeftSession;
const abortSignal: AbortSignal = ensureCliAbortSignal(this._terminal);

// Record this as the start of task execution.
this._metricsCollector.setStartTime();
initializeHeft(heftConfiguration, this._terminal, this._verboseFlag.value);
await runWithLoggingAsync(
this._cleanFilesAsync.bind(this),
Expand Down
10 changes: 10 additions & 0 deletions common/changes/@rushstack/heft/patch-1_2024-03-14-12-44.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/heft",
"comment": "Fix internal error when run 'heft clean'",
"type": "patch"
}
],
"packageName": "@rushstack/heft"
}

0 comments on commit ba823b5

Please sign in to comment.