From 289adc856e2ff169e79bf57678ee57e5ff8b2612 Mon Sep 17 00:00:00 2001 From: Steve Hetzel Date: Fri, 10 Nov 2023 16:50:52 -0700 Subject: [PATCH] fix: pass json flag to plugins install --- src/hooks/jitPluginInstall.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/hooks/jitPluginInstall.ts b/src/hooks/jitPluginInstall.ts index 62597162..e0098db4 100644 --- a/src/hooks/jitPluginInstall.ts +++ b/src/hooks/jitPluginInstall.ts @@ -21,7 +21,12 @@ const hook: Hook<'jit_plugin_not_installed'> = async function (opts) { command: opts.command.id, }); - await opts.config.runCommand('plugins:install', [`${opts.command.pluginName}@${opts.pluginVersion}`]); + const jitInstallArgv = [`${opts.command.pluginName}@${opts.pluginVersion}`]; + if (opts.argv.includes('--json')) { + // pass along --json arg to plugins:install + jitInstallArgv.push('--json'); + } + await opts.config.runCommand('plugins:install', jitInstallArgv); global.cliTelemetry?.record({ eventName: 'JIT_INSTALL_SUCCESS',