()
| 51 | } |
| 52 | |
| 53 | export function getPlatformDetails(): IPlatformDetails { |
| 54 | let operatingSystem = OperatingSystem.Unknown; |
| 55 | |
| 56 | if (process.platform === "win32") { |
| 57 | operatingSystem = OperatingSystem.Windows; |
| 58 | } else if (process.platform === "darwin") { |
| 59 | operatingSystem = OperatingSystem.MacOS; |
| 60 | } else if (process.platform === "linux") { |
| 61 | operatingSystem = OperatingSystem.Linux; |
| 62 | } |
| 63 | |
| 64 | const isProcess64Bit = process.arch === "x64" || process.arch === "arm64"; |
| 65 | |
| 66 | return { |
| 67 | operatingSystem, |
| 68 | isOS64Bit: |
| 69 | isProcess64Bit || process.env.PROCESSOR_ARCHITEW6432 !== undefined, |
| 70 | isProcess64Bit, |
| 71 | }; |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * Class to lazily find installed PowerShell executables on a machine. |
no outgoing calls
no test coverage detected