mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Remove Platform module
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
function prompt {
|
||||
"PS " + $(get-location) + "> "
|
||||
}
|
||||
|
||||
Import-Module Microsoft.PowerShell.Platform
|
||||
|
||||
Binary file not shown.
@@ -1,18 +0,0 @@
|
||||
# Use the .NET Core APIs to determine the current platform; if a runtime
|
||||
# exception is thrown, we are on FullCLR, not .NET Core.
|
||||
try {
|
||||
$Runtime = [System.Runtime.InteropServices.RuntimeInformation]
|
||||
$OSPlatform = [System.Runtime.InteropServices.OSPlatform]
|
||||
|
||||
$IsCore = $true
|
||||
$IsLinux = $Runtime::IsOSPlatform($OSPlatform::Linux)
|
||||
$IsOSX = $Runtime::IsOSPlatform($OSPlatform::OSX)
|
||||
$IsWindows = $Runtime::IsOSPlatform($OSPlatform::Windows)
|
||||
} catch [System.Management.Automation.RuntimeException] {
|
||||
$IsCore = $false
|
||||
$IsLinux = $false
|
||||
$IsOSX = $false
|
||||
$IsWindows = $true
|
||||
}
|
||||
|
||||
Export-ModuleMember -Variable IsCore, IsLinux, IsOSX, IsWindows
|
||||
Reference in New Issue
Block a user