mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-29 01:02:03 +03:00
fix: suppress banner and doctor checks for completion command
This commit is contained in:
@@ -31,6 +31,7 @@ export function registerPreActionHooks(program: Command, programVersion: string)
|
|||||||
const hideBanner =
|
const hideBanner =
|
||||||
isTruthyEnvValue(process.env.OPENCLAW_HIDE_BANNER) ||
|
isTruthyEnvValue(process.env.OPENCLAW_HIDE_BANNER) ||
|
||||||
commandPath[0] === "update" ||
|
commandPath[0] === "update" ||
|
||||||
|
commandPath[0] === "completion" ||
|
||||||
(commandPath[0] === "plugins" && commandPath[1] === "update");
|
(commandPath[0] === "plugins" && commandPath[1] === "update");
|
||||||
if (!hideBanner) {
|
if (!hideBanner) {
|
||||||
emitCliBanner(programVersion);
|
emitCliBanner(programVersion);
|
||||||
@@ -40,7 +41,7 @@ export function registerPreActionHooks(program: Command, programVersion: string)
|
|||||||
if (!verbose) {
|
if (!verbose) {
|
||||||
process.env.NODE_NO_WARNINGS ??= "1";
|
process.env.NODE_NO_WARNINGS ??= "1";
|
||||||
}
|
}
|
||||||
if (commandPath[0] === "doctor") return;
|
if (commandPath[0] === "doctor" || commandPath[0] === "completion") return;
|
||||||
await ensureConfigReady({ runtime: defaultRuntime, commandPath });
|
await ensureConfigReady({ runtime: defaultRuntime, commandPath });
|
||||||
// Load plugins for commands that need channel access
|
// Load plugins for commands that need channel access
|
||||||
if (PLUGIN_REQUIRED_COMMANDS.has(commandPath[0])) {
|
if (PLUGIN_REQUIRED_COMMANDS.has(commandPath[0])) {
|
||||||
|
|||||||
Reference in New Issue
Block a user