(value: string, homeDir: string)
| 38 | } |
| 39 | |
| 40 | function expandHomePath(value: string, homeDir: string): string { |
| 41 | if (value === "~") { |
| 42 | return homeDir; |
| 43 | } |
| 44 | |
| 45 | if (value.startsWith("~/") || value.startsWith("~\\")) { |
| 46 | return path.join(homeDir, value.slice(2)); |
| 47 | } |
| 48 | |
| 49 | return value; |
| 50 | } |
| 51 | |
| 52 | function normalizeIdentityFile(value: string, homeDir: string): string { |
| 53 | const expanded = expandHomePath(value, homeDir); |
no outgoing calls
no test coverage detected