| 129 | } |
| 130 | |
| 131 | export function getVcpkgPathDescriptorFile(): string { |
| 132 | if (process.platform === 'win32') { |
| 133 | const pathPrefix: string | undefined = process.env.LOCALAPPDATA; |
| 134 | if (!pathPrefix) { |
| 135 | throw new Error("Unable to read process.env.LOCALAPPDATA"); |
| 136 | } |
| 137 | return path.join(pathPrefix, "vcpkg/vcpkg.path.txt"); |
| 138 | } else { |
| 139 | const pathPrefix: string = os.homedir(); |
| 140 | return path.join(pathPrefix, ".vcpkg/vcpkg.path.txt"); |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | let vcpkgRoot: string | undefined; |
| 145 | export function getVcpkgRoot(): string { |