()
| 29 | } |
| 30 | |
| 31 | export function getUserHomeDir(): Uri { |
| 32 | if (getOSType() === OSType.Windows) { |
| 33 | return Uri.file(getEnvironmentVariable('USERPROFILE') || homePath); |
| 34 | } |
| 35 | const homeVar = getEnvironmentVariable('HOME') || getEnvironmentVariable('HOMEPATH') || homePath; |
| 36 | |
| 37 | // Make sure if linux, it uses linux separators |
| 38 | return Uri.file(homeVar.replace(/\\/g, '/')); |
| 39 | } |