()
| 87 | } |
| 88 | |
| 89 | function processEnvironment(): Record<string, string> { |
| 90 | return { |
| 91 | ...Object.fromEntries( |
| 92 | Object.entries(process.env).filter((entry): entry is [string, string] => entry[1] !== undefined), |
| 93 | ), |
| 94 | NO_COLOR: "1", |
| 95 | TERM: "dumb", |
| 96 | PAGER: "cat", |
| 97 | GIT_PAGER: "cat", |
| 98 | GH_PAGER: "cat", |
| 99 | CODEX_CI: "1", |
| 100 | LANG: process.env.LANG ?? "C.UTF-8", |
| 101 | LC_ALL: process.env.LC_ALL ?? "C.UTF-8", |
| 102 | }; |
| 103 | } |
| 104 | |
| 105 | function codePointLength(value: string): number { |
| 106 | return Array.from(value).length; |