fix(auth): show command checks unified config for accounts

Use getAllProfilesMerged() and getDefaultResolved() to check both
unified config and legacy profiles when showing account details.

Fixes #458
This commit is contained in:
kaitranntt
2026-02-04 18:08:39 -05:00
parent 8d5f7d2d83
commit 0e140f83e4
+7 -2
View File
@@ -26,8 +26,13 @@ export async function handleShow(ctx: CommandContext, args: string[]): Promise<v
}
try {
const profile = ctx.registry.getProfile(profileName);
const defaultProfile = ctx.registry.getDefaultProfile();
// Use merged profiles (checks unified config first, falls back to legacy)
const allProfiles = ctx.registry.getAllProfilesMerged();
const profile = allProfiles[profileName];
if (!profile) {
exitWithError(`Profile not found: ${profileName}`, ExitCode.PROFILE_ERROR);
}
const defaultProfile = ctx.registry.getDefaultResolved();
const isDefault = profileName === defaultProfile;
const instancePath = ctx.instanceMgr.getInstancePath(profileName);