From b21d0ae32d38ac344d13a056780f9d0b3bbe0cbb Mon Sep 17 00:00:00 2001 From: GareArc Date: Mon, 11 May 2026 19:01:14 -0700 Subject: [PATCH] fix(cli): call this.parse in arg-less commands to silence oclif UnparsedCommand warning oclif v4 warns "did not parse its arguments" for any command class whose run() never calls this.parse(ClassName), independent of whether the command declares args/flags. Add the call in the five arg-less commands. --- cli/src/commands/auth/logout/index.ts | 1 + cli/src/commands/config/path/index.ts | 1 + cli/src/commands/help/account/index.ts | 1 + cli/src/commands/help/environment/index.ts | 1 + cli/src/commands/help/external/index.ts | 1 + 5 files changed, 5 insertions(+) diff --git a/cli/src/commands/auth/logout/index.ts b/cli/src/commands/auth/logout/index.ts index 3049575ca5..c949d0c8e0 100644 --- a/cli/src/commands/auth/logout/index.ts +++ b/cli/src/commands/auth/logout/index.ts @@ -17,6 +17,7 @@ export default class Logout extends DifyCommand { ] async run(): Promise { + await this.parse(Logout) const configDir = resolveConfigDir() const bundle = await loadHosts(configDir) const { store } = await selectStore({ configDir }) diff --git a/cli/src/commands/config/path/index.ts b/cli/src/commands/config/path/index.ts index 577a365041..8106907835 100644 --- a/cli/src/commands/config/path/index.ts +++ b/cli/src/commands/config/path/index.ts @@ -10,6 +10,7 @@ export default class ConfigPath extends DifyCommand { ] async run(): Promise { + await this.parse(ConfigPath) process.stdout.write(runConfigPath({ dir: resolveConfigDir() })) } } diff --git a/cli/src/commands/help/account/index.ts b/cli/src/commands/help/account/index.ts index f63324eb0d..bdb232e528 100644 --- a/cli/src/commands/help/account/index.ts +++ b/cli/src/commands/help/account/index.ts @@ -9,6 +9,7 @@ export default class HelpAccount extends DifyCommand { ] async run(): Promise { + await this.parse(HelpAccount) process.stdout.write(runHelpAccount()) } } diff --git a/cli/src/commands/help/environment/index.ts b/cli/src/commands/help/environment/index.ts index 3e67667f07..124d822f31 100644 --- a/cli/src/commands/help/environment/index.ts +++ b/cli/src/commands/help/environment/index.ts @@ -9,6 +9,7 @@ export default class HelpEnvironment extends DifyCommand { ] async run(): Promise { + await this.parse(HelpEnvironment) process.stdout.write(runHelpEnvironment()) } } diff --git a/cli/src/commands/help/external/index.ts b/cli/src/commands/help/external/index.ts index b476cb20cb..1e25ce4577 100644 --- a/cli/src/commands/help/external/index.ts +++ b/cli/src/commands/help/external/index.ts @@ -9,6 +9,7 @@ export default class HelpExternal extends DifyCommand { ] async run(): Promise { + await this.parse(HelpExternal) process.stdout.write(runHelpExternal()) } }