MCPcopy Index your code
hub / github.com/PowerShell/vscode-powershell / getPlatformDetails

Function getPlatformDetails

src/platform.ts:53–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51}
52
53export 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.

Callers 3

constructorMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected