Summary of the new feature / enhancement
For CoreClr, we have 4 platform Windows, MacOS, Linux and FreeBSD in a PR
| Variable |
Description |
PowerShell |
dotnet API |
| IsCoreClr |
|
Platform.IsCoreClr |
true |
| IsWindows |
|
Platform.IsWindows |
OperatingSystem.IsWindows() |
| IsLinux |
|
Platform.IsLinux |
OperatingSystem.IsLinux() |
| IsMacOS |
|
Platform.IsMacOS |
OperatingSystem.IsMacOS() |
| IsFreeBSD |
PR20041 |
Platform.IsFreeBSD |
OperatingSystem.IsFreeBSD() |
For net9.0, we have more platforms herited from MonoEngine and compatible with the Microsoft.PowerShell.Sdk
Based on the System.OperatingSystem Methods and the RidGraph, we should add the following platforms and variables :
Proposed technical implementation details (optional)
Step 1
Step 2
- Add each global variable Is*
OR
- Stop declaring Is* variables and move to another syntax like a PSDrive $is:Windows or a hashtable $Is.Windows
Summary of the new feature / enhancement
For CoreClr, we have 4 platform Windows, MacOS, Linux and FreeBSD in a PR
For net9.0, we have more platforms herited from MonoEngine and compatible with the Microsoft.PowerShell.Sdk
Based on the System.OperatingSystem Methods and the RidGraph, we should add the following platforms and variables :
Proposed technical implementation details (optional)
Step 1
Step 2
OR