( bin: string, args: string[], env: NodeJS.ProcessEnv = process.env, )
| 457 | * env, bin, args) so we can assert on it without actually spawning. |
| 458 | */ |
| 459 | export function buildTelemetrySpawnCommand( |
| 460 | bin: string, |
| 461 | args: string[], |
| 462 | env: NodeJS.ProcessEnv = process.env, |
| 463 | ): { cmd: string; cmdArgs: string[] } | null { |
| 464 | if (process.platform === 'win32') { |
| 465 | const bashPath = resolveBashBinary(env); |
| 466 | if (!bashPath) return null; |
| 467 | return { cmd: bashPath, cmdArgs: [bin, ...args] }; |
| 468 | } |
| 469 | return { cmd: bin, cmdArgs: args }; |
| 470 | } |
| 471 | |
| 472 | /** |
| 473 | * Fire-and-forget subprocess invocation of gstack-telemetry-log with the |
no test coverage detected