ps/Modules/Cole.PowerShell.Developer/Public/Test-IsUnixPlatform.ps1

14 lines
336 B
PowerShell
Raw Normal View History

2023-05-30 22:51:22 -07:00
function Test-IsUnixPlatform {
<#
.SYNOPSIS
Returns true if the platform is Unix
This is as opposed to Windows. Mac is a subset of Unix.
#>
[CmdletBinding()]
[OutputType([bool])]
param (
)
$platform = $PSVersionTable.Platform
return (![string]::IsNullOrWhiteSpace($platform) -and $platform -eq "Unix")
}