Skip to content

Commit 2041093

Browse files
committed
refactor: adjust command logic
1 parent d5e05a4 commit 2041093

File tree

1 file changed

+6
-2
lines changed
  • packages/nx-plugin/src/executors/internal

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,14 @@ export function createCliCommandObject(options?: {
4646
bin?: string;
4747
}): ProcessConfig {
4848
const { bin = 'npx @code-pushup/cli', command, args } = options ?? {};
49-
const finalCommand = bin.split(' ').at(0) as string;
49+
const binArr = bin.split(' ');
50+
const finalCommand = binArr.at(0) as string;
5051
return {
5152
command: finalCommand,
52-
args: [bin.slice(1), ...objectToCliArgs({ _: command ?? [], ...args })],
53+
args: [
54+
...binArr.slice(1),
55+
...objectToCliArgs({ _: command ?? [], ...args }),
56+
],
5357
observer: {
5458
onError: error => {
5559
logger.error(error.message);

0 commit comments

Comments
 (0)