Skip to content

Commit

Permalink
fix: pass json flag to plugins install
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Nov 10, 2023
1 parent 2c86015 commit 289adc8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/hooks/jitPluginInstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 289adc8

Please sign in to comment.