Update cli/src/commands/client/plugin.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
@@ -303,14 +303,15 @@ export function registerPluginCommands(program: Command): void {
|
|||||||
`/api/plugins/${encodeURIComponent(pluginKey)}`,
|
`/api/plugins/${encodeURIComponent(pluginKey)}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (ctx.json) {
|
||||||
|
printOutput(result, { json: true });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
console.log(pc.red(`Plugin not found: ${pluginKey}`));
|
console.log(pc.red(`Plugin not found: ${pluginKey}`));
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx.json) {
|
|
||||||
printOutput(result, { json: true });
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(formatPlugin(result));
|
console.log(formatPlugin(result));
|
||||||
|
|||||||
Reference in New Issue
Block a user