Skip to content

Commit 30e9c3a

Browse files
committed
fix: move loadStatusConfig outside telemetry callback to restore context scope
After rebasing, the dataset management code references context.deployedState outside the withCommandRunTelemetry callback where context was defined. Move loadStatusConfig() before the callback so context is accessible in both the telemetry wrapper and the dataset enrichment logic.
1 parent eb02167 commit 30e9c3a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/cli/commands/status/command.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { ValidationError, serializeResult } from '../../../lib';
22
import { getErrorMessage } from '../../errors';
3-
import { withCommandRunTelemetry } from '../../telemetry/cli-command-run.js';
4-
import { FilterState, FilterType, standardize } from '../../telemetry/schemas/common-shapes.js';
53
import { getDatasetStatus } from '../../operations/dataset';
64
import type { DatasetStatusResult } from '../../operations/dataset';
5+
import { withCommandRunTelemetry } from '../../telemetry/cli-command-run.js';
6+
import { FilterState, FilterType, standardize } from '../../telemetry/schemas/common-shapes.js';
77
import { COMMAND_DESCRIPTIONS } from '../../tui/copy';
88
import { requireProject } from '../../tui/guards';
99
import type { ResourceStatusEntry } from './action';
@@ -137,8 +137,8 @@ export const registerStatus = (program: Command) => {
137137
}
138138

139139
// Default path: show all resource types with deployment state
140+
const context = await loadStatusConfig();
140141
const result = await withCommandRunTelemetry('status', telemetryAttrs, async () => {
141-
const context = await loadStatusConfig();
142142
return handleProjectStatus(context, { targetName: cliOptions.target });
143143
});
144144

0 commit comments

Comments
 (0)