diff --git a/src/index.ts b/src/index.ts index d933f26..7287ec4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,7 +12,7 @@ const { args, cmd } = getArgs() switch (cmd) { case '--recursive': { - await nodeExec(['--reporter=ndjson', `--recursive=${args.join(' ')}`]) + await execCmd('x', ['pnpm', '--reporter=ndjson', '--recursive', 'run', ...args], 'inherit') break } diff --git a/src/lib/exec.ts b/src/lib/exec.ts index 8b00bb1..179d4d6 100644 --- a/src/lib/exec.ts +++ b/src/lib/exec.ts @@ -6,7 +6,7 @@ import { packageManager } from './projectData.ts' export const execCmd = async (cmd: string, args: readonly string[], stdio: 'pipe' | 'inherit' = 'pipe') => { const cmdName = cmd.split('/').pop()?.split('.').shift() - printLog(`${cmdName} ${args.join(' ')}\n`, 'warn') + if (cmd !== 'x') printLog(`${cmdName} ${args.join(' ')}\n`, 'warn') const execPromise = new Promise((resolve, _) => { const output = spawn(cmd, args, { diff --git a/src/lib/logger.ts b/src/lib/logger.ts index 7be12af..241bbd3 100644 --- a/src/lib/logger.ts +++ b/src/lib/logger.ts @@ -118,7 +118,7 @@ const formatLog = (input: string, type: LogType, prefix?: string) => { } } -export const printLog = (txt: string, type: LogType, prefix = '\n') => { +export const printLog = (txt: string, type: LogType, prefix = '') => { // biome-ignore format: switch (type) { case 'info': return console.log(prefix + txt)