mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 17:00:25 +00:00
CLI: keep root help plugin descriptors non-activating (#57294)
Merged via squash.
Prepared head SHA: c8da48f689
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
committed by
GitHub
parent
1efef8205c
commit
e5dac0c39e
12
src/entry.ts
12
src/entry.ts
@@ -159,7 +159,7 @@ if (
|
||||
export function tryHandleRootHelpFastPath(
|
||||
argv: string[],
|
||||
deps: {
|
||||
outputRootHelp?: () => void;
|
||||
outputRootHelp?: () => void | Promise<void>;
|
||||
onError?: (error: unknown) => void;
|
||||
env?: NodeJS.ProcessEnv;
|
||||
} = {},
|
||||
@@ -180,16 +180,14 @@ export function tryHandleRootHelpFastPath(
|
||||
process.exitCode = 1;
|
||||
});
|
||||
if (deps.outputRootHelp) {
|
||||
try {
|
||||
deps.outputRootHelp();
|
||||
} catch (error) {
|
||||
handleError(error);
|
||||
}
|
||||
Promise.resolve()
|
||||
.then(() => deps.outputRootHelp?.())
|
||||
.catch(handleError);
|
||||
return true;
|
||||
}
|
||||
import("./cli/program/root-help.js")
|
||||
.then(({ outputRootHelp }) => {
|
||||
outputRootHelp();
|
||||
return outputRootHelp();
|
||||
})
|
||||
.catch(handleError);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user