Skip to content

Commit e74275b

Browse files
author
Michael Hladky
committed
refactor: wip
1 parent 2787b89 commit e74275b

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

packages/nx-plugin/src/executors/cli/executor.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,22 @@ export default async function runCliExecutor(
1818
const { objectToCliArgs, formatCommandStatus, logger, stringifyError } =
1919
await import('@code-pushup/utils');
2020
const normalizedContext = normalizeContext(context);
21-
const cliArgumentObject = parseCliExecutorOptions(
22-
terminalAndExecutorOptions,
23-
normalizedContext,
24-
);
2521
const {
2622
command: cliCommand,
2723
verbose = false,
2824
dryRun,
2925
env: executorEnv,
3026
bin,
3127
...restArgs
32-
} = cliArgumentObject;
28+
} = parseCliExecutorOptions(terminalAndExecutorOptions, normalizedContext);
29+
3330
logger.setVerbose(verbose);
3431

3532
const command = bin ? `node` : 'npx';
36-
const positionals = [
37-
bin ?? '@code-pushup/cli',
38-
...(cliCommand ? [cliCommand] : []),
33+
const args = [
34+
...[bin ?? '@code-pushup/cli', ...(cliCommand ? [cliCommand] : [])],
35+
...objectToCliArgs(restArgs),
3936
];
40-
const args = [...positionals, ...objectToCliArgs(restArgs)];
4137
const commandString = formatCommandStatus([command, ...args].join(' '), {
4238
cwd: context.cwd,
4339
env: {

0 commit comments

Comments
 (0)