Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 79d83fd

Browse files
ffeldhausbmanikm
authored andcommitted
Rename IsOSX to IsMacOS after breaking change in PowerShell 6.0.0-beta.7 to fix #333 (#334)
1 parent c050b4c commit 79d83fd

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

PSSwagger.LiveTestFramework/build/PSSwagger.LiveTestFramework.Build.psm1

+4-4
Original file line numberDiff line numberDiff line change
@@ -252,15 +252,15 @@ function Install-Dotnet {
252252
$osInfo = PSSwaggerUtility\Get-OperatingSystemInfo
253253
$obtainUrl = "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain"
254254

255-
# Install for Linux and OS X
256-
if ($osInfo.IsLinux -or $osInfo.IsOSX) {
255+
# Install for Linux and Mac OS
256+
if ($osInfo.IsLinux -or $osInfo.IsMacOS) {
257257
$LinuxInfo = Get-Content /etc/os-release -Raw | ConvertFrom-StringData
258258
$IsUbuntu = $LinuxInfo.ID -match 'ubuntu'
259259

260260
# Uninstall all previous dotnet packages
261261
$uninstallScript = if ($IsUbuntu) {
262262
"dotnet-uninstall-debian-packages.sh"
263-
} elseif ($osInfo.IsOSX) {
263+
} elseif ($osInfo.IsMacOS) {
264264
"dotnet-uninstall-pkgs.sh"
265265
}
266266

@@ -339,4 +339,4 @@ function script:Start-NativeExecution([scriptblock]$sb, [switch]$IgnoreExitcode)
339339
}
340340
}
341341

342-
Export-ModuleMember -Function Initialize-BuildDependency,Invoke-Build,Start-BuildDotNetProject
342+
Export-ModuleMember -Function Initialize-BuildDependency,Invoke-Build,Start-BuildDotNetProject

PSSwagger.LiveTestFramework/test/PSSwagger.LiveTestFramework.Tests.psm1

+3-3
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,14 @@ function Install-Dotnet {
157157
$obtainUrl = "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain"
158158

159159
# Install for Linux and OS X
160-
if ($osInfo.IsLinux -or $osInfo.IsOSX) {
160+
if ($osInfo.IsLinux -or $osInfo.IsMacOS) {
161161
$LinuxInfo = Get-Content /etc/os-release -Raw | ConvertFrom-StringData
162162
$IsUbuntu = $LinuxInfo.ID -match 'ubuntu'
163163

164164
# Uninstall all previous dotnet packages
165165
$uninstallScript = if ($IsUbuntu) {
166166
"dotnet-uninstall-debian-packages.sh"
167-
} elseif ($osInfo.IsOSX) {
167+
} elseif ($osInfo.IsMacOS) {
168168
"dotnet-uninstall-pkgs.sh"
169169
}
170170

@@ -243,4 +243,4 @@ function script:Start-NativeExecution([scriptblock]$sb, [switch]$IgnoreExitcode)
243243
}
244244
}
245245

246-
Export-ModuleMember -Function Initialize-TestDependency,Start-TestRun
246+
Export-ModuleMember -Function Initialize-TestDependency,Start-TestRun

PSSwagger/PSSwaggerUtility/PSSwaggerUtility.psm1

+4-4
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,13 @@ function Start-PSSwaggerJobHelper
250250

251251
<#
252252
.DESCRIPTION
253-
Gets operating system information. Returns an object with the following boolean properties: IsCore, IsLinux, IsWindows, IsOSX, IsNanoServer, IsIoT
253+
Gets operating system information. Returns an object with the following boolean properties: IsCore, IsLinux, IsWindows, IsMacOS, IsNanoServer, IsIoT
254254
#>
255255
function Get-OperatingSystemInfo {
256256
$info = @{
257257
IsCore = $false
258258
IsLinux = $false
259-
IsOSX = $false
259+
IsMacOS = $false
260260
IsWindows = $false
261261
IsNanoServer = $false
262262
IsIoT = $false
@@ -265,7 +265,7 @@ function Get-OperatingSystemInfo {
265265
if ('System.Management.Automation.Platform' -as [Type]) {
266266
$info.IsCore = [System.Management.Automation.Platform]::IsCoreCLR
267267
$info.IsLinux = [System.Management.Automation.Platform]::IsLinux
268-
$info.IsOSX = [System.Management.Automation.Platform]::IsOSX
268+
$info.IsMacOS = [System.Management.Automation.Platform]::IsMacOS
269269
$info.IsWindows = [System.Management.Automation.Platform]::IsWindows
270270
$info.IsNanoServer = [System.Management.Automation.Platform]::IsNanoServer
271271
$info.IsIoT = [System.Management.Automation.Platform]::IsIoT
@@ -1974,4 +1974,4 @@ function Get-AutoRestCredential {
19741974
} else {
19751975
Get-EmptyAuthCredentialInternal
19761976
}
1977-
}
1977+
}

Tests/PSSwagger.Unit.Tests.ps1

+3-3
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Describe "PSSwagger Unit Tests" -Tag @('BVT', 'DRT', 'UnitTest', 'P0') {
7373
return @{
7474
IsCore = $true
7575
IsLinux = $true
76-
IsOSX = $false
76+
IsMacOS = $false
7777
IsWindows = $false
7878
}
7979
}
@@ -120,7 +120,7 @@ Describe "PSSwagger Unit Tests" -Tag @('BVT', 'DRT', 'UnitTest', 'P0') {
120120
return @{
121121
IsCore = $true
122122
IsLinux = $true
123-
IsOSX = $false
123+
IsMacOS = $false
124124
IsWindows = $false
125125
}
126126
}
@@ -161,7 +161,7 @@ Describe "PSSwagger Unit Tests" -Tag @('BVT', 'DRT', 'UnitTest', 'P0') {
161161
return @{
162162
IsCore = $true
163163
IsLinux = $false
164-
IsOSX = $false
164+
IsMacOS = $false
165165
IsWindows = $true
166166
}
167167
}

0 commit comments

Comments
 (0)