mirror of
https://github.com/langgenius/dify.git
synced 2026-05-13 00:33:37 +08:00
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.
This commit is contained in:
parent
6779366dca
commit
b21d0ae32d
@ -17,6 +17,7 @@ export default class Logout extends DifyCommand {
|
||||
]
|
||||
|
||||
async run(): Promise<void> {
|
||||
await this.parse(Logout)
|
||||
const configDir = resolveConfigDir()
|
||||
const bundle = await loadHosts(configDir)
|
||||
const { store } = await selectStore({ configDir })
|
||||
|
||||
@ -10,6 +10,7 @@ export default class ConfigPath extends DifyCommand {
|
||||
]
|
||||
|
||||
async run(): Promise<void> {
|
||||
await this.parse(ConfigPath)
|
||||
process.stdout.write(runConfigPath({ dir: resolveConfigDir() }))
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ export default class HelpAccount extends DifyCommand {
|
||||
]
|
||||
|
||||
async run(): Promise<void> {
|
||||
await this.parse(HelpAccount)
|
||||
process.stdout.write(runHelpAccount())
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ export default class HelpEnvironment extends DifyCommand {
|
||||
]
|
||||
|
||||
async run(): Promise<void> {
|
||||
await this.parse(HelpEnvironment)
|
||||
process.stdout.write(runHelpEnvironment())
|
||||
}
|
||||
}
|
||||
|
||||
1
cli/src/commands/help/external/index.ts
vendored
1
cli/src/commands/help/external/index.ts
vendored
@ -9,6 +9,7 @@ export default class HelpExternal extends DifyCommand {
|
||||
]
|
||||
|
||||
async run(): Promise<void> {
|
||||
await this.parse(HelpExternal)
|
||||
process.stdout.write(runHelpExternal())
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user