Skip to content

Commit ff4195f

Browse files
committed
fix(profile): use exhaustive switch check in view.ts default case
1 parent 16f269c commit ff4195f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/commands/profile/view.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,13 @@ export const viewCommand = buildCommand({
179179
target = await resolveOrgAndProject({ cwd, usageHint: USAGE_HINT });
180180
break;
181181

182-
default:
183-
// Exhaustive check - should never reach here
184-
throw new ContextError("Invalid target specification", USAGE_HINT);
182+
default: {
183+
const _exhaustiveCheck: never = parsed;
184+
throw new ContextError(
185+
`Unexpected target type: ${_exhaustiveCheck}`,
186+
USAGE_HINT
187+
);
188+
}
185189
}
186190

187191
if (!target) {

0 commit comments

Comments
 (0)