Skip to content

Commit 289adc8

Browse files
committed
fix: pass json flag to plugins install
1 parent 2c86015 commit 289adc8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/hooks/jitPluginInstall.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@ const hook: Hook<'jit_plugin_not_installed'> = async function (opts) {
2121
command: opts.command.id,
2222
});
2323

24-
await opts.config.runCommand('plugins:install', [`${opts.command.pluginName}@${opts.pluginVersion}`]);
24+
const jitInstallArgv = [`${opts.command.pluginName}@${opts.pluginVersion}`];
25+
if (opts.argv.includes('--json')) {
26+
// pass along --json arg to plugins:install
27+
jitInstallArgv.push('--json');
28+
}
29+
await opts.config.runCommand('plugins:install', jitInstallArgv);
2530

2631
global.cliTelemetry?.record({
2732
eventName: 'JIT_INSTALL_SUCCESS',

0 commit comments

Comments
 (0)