(key: string)
| 3 | const SHELL_ENV_NAME_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/; |
| 4 | |
| 5 | export function assertShellEnvName(key: string): void { |
| 6 | if (!SHELL_ENV_NAME_PATTERN.test(key)) { |
| 7 | throw new Error(`Invalid shell environment variable name: ${key}`); |
| 8 | } |
| 9 | } |
| 10 | |
| 11 | export function buildShellExport( |
| 12 | key: string, |
no test coverage detected