(text: string)
| 133 | } |
| 134 | |
| 135 | function home(text: string) { |
| 136 | if (text === "~") return os.homedir() |
| 137 | if (text.startsWith("~/") || text.startsWith("~\\")) return path.join(os.homedir(), text.slice(2)) |
| 138 | return text |
| 139 | } |
| 140 | |
| 141 | function envValue(key: string) { |
| 142 | if (process.platform !== "win32") return process.env[key] |