(cmd: string, options?: Omit<ExecSyncOptions, 'env'> & { env?: Record<string, string> })
| 5 | * Utility for executing command synchronously and prints outputs on current console |
| 6 | */ |
| 7 | export function execSync(cmd: string, options?: Omit<ExecSyncOptions, 'env'> & { env?: Record<string, string> }): void { |
| 8 | const { env, ...restOptions } = options ?? {}; |
| 9 | const mergedEnv = env ? { ...process.env, ...env } : undefined; |
| 10 | _exec(cmd, { |
| 11 | encoding: 'utf-8', |
| 12 | stdio: options?.stdio ?? 'inherit', |
| 13 | env: mergedEnv, |
| 14 | ...restOptions, |
| 15 | }); |
| 16 | } |
| 17 | |
| 18 | /** |
| 19 | * Utility for running package commands through npx/bunx |
no outgoing calls