* Gets the command to spawn a teammate. * For native builds (compiled binaries), use process.execPath. * For non-native (node/bun running a script), use process.argv[1].
()
| 191 | * For non-native (node/bun running a script), use process.argv[1]. |
| 192 | */ |
| 193 | function getTeammateCommand(): string { |
| 194 | if (process.env[TEAMMATE_COMMAND_ENV_VAR]) { |
| 195 | return process.env[TEAMMATE_COMMAND_ENV_VAR] |
| 196 | } |
| 197 | return isInBundledMode() ? process.execPath : process.argv[1]! |
| 198 | } |
| 199 | |
| 200 | /** |
| 201 | * Builds CLI flags to propagate from the current session to spawned teammates. |
no test coverage detected