diff --git a/src/commands/storage/test.ts b/src/commands/storage/test.ts index e8e2822..40ae1ea 100644 --- a/src/commands/storage/test.ts +++ b/src/commands/storage/test.ts @@ -14,6 +14,7 @@ import { JnpfClient } from '../../core/client.ts' import { readStorageConfig, defaultYmlPath } from './_helpers.ts' import { log, printJson } from '../../core/log.ts' import { installAiHelpHook } from '../../core/help.ts' +import { enhanceFromBackend, formatErrorLine } from '../_error_codes.ts' interface TestOpts { profile?: string @@ -40,7 +41,8 @@ export function buildStorageTestCommand(): Command { opts.type ? p.type === opts.type : p.enableStorage, ) if (targets.length === 0) { - log.error(`未找到匹配 platform (platform=${platform}, type=${opts.type}, 启用=${platform ? 'N/A' : 'enableStorage=true'})`) + const enhanced = enhanceFromBackend('未找到匹配 platform 配置', 'platform', { entity: 'storage' }) + log.error(` ${formatErrorLine(enhanced, { step: 0, stepName: '配置检查' })}`) process.exit(2) } const results: Array<{ platform: string; type: string; ok: boolean; msg: string; ms: number }> = []