mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-23 09:43:57 +08:00
Remove unneeded try-catch in build.psm1 (#4328)
This commit is contained in:
parent
905e6978e6
commit
d24d1634ba
12
build.psm1
12
build.psm1
@ -22,14 +22,10 @@ function Get-EnvironmentInformation
|
||||
$environment += @{'IsOSX' = $Runtime::IsOSPlatform($OSPlatform::OSX)}
|
||||
$environment += @{'IsWindows' = $Runtime::IsOSPlatform($OSPlatform::Windows)}
|
||||
} catch {
|
||||
# If these are already set, then they're read-only and we're done
|
||||
try {
|
||||
$environment += @{'IsCoreCLR' = $false}
|
||||
$environment += @{'IsLinux' = $false}
|
||||
$environment += @{'IsOSX' = $false}
|
||||
$environment += @{'IsWindows' = $true}
|
||||
}
|
||||
catch { }
|
||||
$environment += @{'IsCoreCLR' = $false}
|
||||
$environment += @{'IsLinux' = $false}
|
||||
$environment += @{'IsOSX' = $false}
|
||||
$environment += @{'IsWindows' = $true}
|
||||
}
|
||||
|
||||
if ($Environment.IsWindows)
|
||||
|
Loading…
Reference in New Issue
Block a user