From e0fe1499ce6afa24ca80796590f70dbaca45fb24 Mon Sep 17 00:00:00 2001 From: DavidGOrtega Date: Tue, 16 Aug 2022 16:39:31 +0200 Subject: [PATCH] nitpick --- bin/cml.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/cml.js b/bin/cml.js index 6df846b51..9f41d3f65 100755 --- a/bin/cml.js +++ b/bin/cml.js @@ -65,8 +65,9 @@ const setupTelemetry = async (opts) => { const runPlugin = async ({ $0: executable, command }) => { if (command === undefined) throw new Error('no command'); + const { argv } = process.argv; const path = which.sync(`${basename(executable)}-${command}`); - const parameters = process.argv.slice(process.argv.indexOf(command) + 1); // HACK + const parameters = argv.slice(argv.indexOf(command) + 1); // HACK await pseudoexec(path, parameters); };