Skip to content

The open-source app everyone uses to manage agents at work

Update cli/src/commands/client/plugin.ts

gsxdsm4f8df1804df0
diff --git a/cli/src/commands/client/plugin.ts b/cli/src/commands/client/plugin.ts
index c032b98816..bb54f00d63 100644
--- a/cli/src/commands/client/plugin.ts
+++ b/cli/src/commands/client/plugin.ts
@@ -303,14 +303,15 @@ export function registerPluginCommands(program: Command): void {
`/api/plugins/${encodeURIComponent(pluginKey)}`,
);
+ if (ctx.json) {
+ printOutput(result, { json: true });
+ return;
+ }
+
if (!result) {
console.log(pc.red(`Plugin not found: ${pluginKey}`));
process.exit(1);
}
-
- if (ctx.json) {
- printOutput(result, { json: true });
- return;
}
console.log(formatPlugin(result));