Skip to content

Commit 7c9b188

Browse files
SteveL-MSFTTravisEz13
authored andcommitted
Rename $IsOSX to $IsMacOS (PowerShell#4757)
1 parent ee0bb15 commit 7c9b188

38 files changed

Lines changed: 93 additions & 93 deletions

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ gen
6161
#VS Code files
6262
.vscode
6363

64-
# OS X
64+
# macOS
6565
.DS_Store
6666

6767
# TestsResults

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ If you have any problems building, please consult the developer [FAQ][].
110110

111111
| AppVeyor (Windows) | Travis CI (Linux) | Travis CI (macOS) | Code Coverage Status |
112112
|--------------------------|-------------------|-------------------|----------------------|
113-
| [![av-nightly-image][]][av-nightly-site] | [![linux-nightly-image][]][tv-site] | [![osx-nightly-image][]][tv-site] | [![cc-image][]][cc-site] |
113+
| [![av-nightly-image][]][av-nightly-site] | [![linux-nightly-image][]][tv-site] | [![macOS-nightly-image][]][tv-site] | [![cc-image][]][cc-site] |
114114

115115
[bd-linux]: docs/building/linux.md
116116
[bd-windows]: docs/building/windows-core.md
@@ -123,7 +123,7 @@ If you have any problems building, please consult the developer [FAQ][].
123123
[av-image]: https://ci.appveyor.com/api/projects/status/nsng9iobwa895f98/branch/master?svg=true
124124
[av-site]: https://ci.appveyor.com/project/PowerShell/powershell
125125
[linux-nightly-image]: https://jimtru1979.blob.core.windows.net/badges/DailyBuildStatus.Linux.svg
126-
[osx-nightly-image]: https://jimtru1979.blob.core.windows.net/badges/DailyBuildStatus.OSX.svg
126+
[macOS-nightly-image]: https://jimtru1979.blob.core.windows.net/badges/DailyBuildStatus.OSX.svg
127127
[av-nightly-image]: https://ci.appveyor.com/api/projects/status/46yd4jogtm2jodcq?svg=true
128128
[av-nightly-site]: https://ci.appveyor.com/project/PowerShell/powershell-f975h
129129
[cc-site]: https://codecov.io/gh/PowerShell/PowerShell

assets/powershell.1.ronn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ powershell(1) -- command-line shell and .NET REPL
1212
## DESCRIPTION
1313

1414
PowerShell is an automation and configuration management platform.
15-
It consists of a cross-platform (Windows, Linux and OS X)
15+
It consists of a cross-platform (Windows, Linux and macOS)
1616
command-line shell and associated scripting language.
1717

1818
## OPTIONS

build.psm1

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ function Get-EnvironmentInformation
107107

108108
$environment += @{'IsCoreCLR' = $true}
109109
$environment += @{'IsLinux' = $Runtime::IsOSPlatform($OSPlatform::Linux)}
110-
$environment += @{'IsOSX' = $Runtime::IsOSPlatform($OSPlatform::OSX)}
110+
$environment += @{'IsMacOS' = $Runtime::IsOSPlatform($OSPlatform::OSX)}
111111
$environment += @{'IsWindows' = $Runtime::IsOSPlatform($OSPlatform::Windows)}
112112
} catch {
113113
$environment += @{'IsCoreCLR' = $false}
114114
$environment += @{'IsLinux' = $false}
115-
$environment += @{'IsOSX' = $false}
115+
$environment += @{'IsMacOS' = $false}
116116
$environment += @{'IsWindows' = $true}
117117
}
118118

@@ -357,7 +357,7 @@ function Start-PSBuild {
357357
# Verify we have all tools in place to do the build
358358
$precheck = precheck 'dotnet' "Build dependency 'dotnet' not found in PATH. Run Start-PSBootstrap. Also see: https://dotnet.github.io/getting-started/"
359359

360-
if ($Environment.IsLinux -or $Environment.IsOSX) {
360+
if ($Environment.IsLinux -or $Environment.IsMacOS) {
361361
foreach ($Dependency in 'cmake', 'make', 'g++') {
362362
$precheck = $precheck -and (precheck $Dependency "Build dependency '$Dependency' not found. Run 'Start-PSBootstrap'.")
363363
}
@@ -381,7 +381,7 @@ Fix steps:
381381
382382
1. Remove the installed version from:
383383
- on windows '`$env:LOCALAPPDATA\Microsoft\dotnet'
384-
- on osx and linux '`$env:HOME/.dotnet'
384+
- on macOS and linux '`$env:HOME/.dotnet'
385385
2. Run Start-PSBootstrap or Install-Dotnet
386386
3. Start-PSBuild -Clean
387387
`n
@@ -451,10 +451,10 @@ Fix steps:
451451
}
452452

453453
# Build native components
454-
if (($Environment.IsLinux -or $Environment.IsOSX) -and -not $SMAOnly) {
454+
if (($Environment.IsLinux -or $Environment.IsMacOS) -and -not $SMAOnly) {
455455
$Ext = if ($Environment.IsLinux) {
456456
"so"
457-
} elseif ($Environment.IsOSX) {
457+
} elseif ($Environment.IsMacOS) {
458458
"dylib"
459459
}
460460

@@ -518,7 +518,7 @@ Fix steps:
518518
if ($Environment.IsRedHatFamily) {
519519
# add two symbolic links to system shared libraries that libmi.so is dependent on to handle
520520
# platform specific changes. This is the only set of platforms needed for this currently
521-
# as Ubuntu has these specific library files in the platform and OSX builds for itself
521+
# as Ubuntu has these specific library files in the platform and macOS builds for itself
522522
# against the correct versions.
523523
if ( ! (test-path "$publishPath/libssl.so.1.0.0")) {
524524
$null = New-Item -Force -ItemType SymbolicLink -Target "/lib64/libssl.so.10" -Path "$publishPath/libssl.so.1.0.0" -ErrorAction Stop
@@ -602,7 +602,7 @@ function New-PSOptions {
602602

603603
$ConfigWarningMsg = "The passed-in Configuration value '{0}' is not supported on '{1}'. Use '{2}' instead."
604604
if (-not $Configuration) {
605-
$Configuration = if ($Environment.IsLinux -or $Environment.IsOSX) {
605+
$Configuration = if ($Environment.IsLinux -or $Environment.IsMacOS) {
606606
"Linux"
607607
} elseif ($Environment.IsWindows) {
608608
"Debug"
@@ -622,7 +622,7 @@ function New-PSOptions {
622622
}
623623
}
624624
Default {
625-
if ($Environment.IsLinux -or $Environment.IsOSX) {
625+
if ($Environment.IsLinux -or $Environment.IsMacOS) {
626626
$Configuration = "Linux"
627627
Write-Warning ($ConfigWarningMsg -f $switch.Current, $Environment.LinuxInfo.PRETTY_NAME, $Configuration)
628628
}
@@ -665,7 +665,7 @@ function New-PSOptions {
665665
}
666666
}
667667

668-
$Executable = if ($Environment.IsLinux -or $Environment.IsOSX) {
668+
$Executable = if ($Environment.IsLinux -or $Environment.IsMacOS) {
669669
"powershell"
670670
} elseif ($Environment.IsWindows) {
671671
"powershell.exe"
@@ -1088,7 +1088,7 @@ function Start-PSxUnit {
10881088
throw "xUnit tests are only currently supported on Linux / OS X"
10891089
}
10901090

1091-
if ($Environment.IsOSX) {
1091+
if ($Environment.IsMacOS) {
10921092
log "Not yet supported on OS X, pretending they passed..."
10931093
return
10941094
}
@@ -1139,11 +1139,11 @@ function Install-Dotnet {
11391139
$obtainUrl = "https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain"
11401140

11411141
# Install for Linux and OS X
1142-
if ($Environment.IsLinux -or $Environment.IsOSX) {
1142+
if ($Environment.IsLinux -or $Environment.IsMacOS) {
11431143
# Uninstall all previous dotnet packages
11441144
$uninstallScript = if ($Environment.IsUbuntu) {
11451145
"dotnet-uninstall-debian-packages.sh"
1146-
} elseif ($Environment.IsOSX) {
1146+
} elseif ($Environment.IsMacOS) {
11471147
"dotnet-uninstall-pkgs.sh"
11481148
}
11491149

@@ -1210,7 +1210,7 @@ function Start-PSBootstrap {
12101210
Push-Location $PSScriptRoot/tools
12111211

12121212
try {
1213-
if ($Environment.IsLinux -or $Environment.IsOSX) {
1213+
if ($Environment.IsLinux -or $Environment.IsMacOS) {
12141214
# This allows sudo install to be optional; needed when running in containers / as root
12151215
# Note that when it is null, Invoke-Expression (but not &) must be used to interpolate properly
12161216
$sudo = if (!$NoSudo) { "sudo" }
@@ -1268,7 +1268,7 @@ function Start-PSBootstrap {
12681268
Start-NativeExecution {
12691269
Invoke-Expression "$baseCommand $Deps"
12701270
}
1271-
} elseif ($Environment.IsOSX) {
1271+
} elseif ($Environment.IsMacOS) {
12721272
precheck 'brew' "Bootstrap dependency 'brew' not found, must install Homebrew! See http://brew.sh/"
12731273

12741274
# Build tools
@@ -1896,7 +1896,7 @@ function Start-CrossGen {
18961896
}
18971897
} elseif ($Environment.IsLinux) {
18981898
"linux-x64"
1899-
} elseif ($Environment.IsOSX) {
1899+
} elseif ($Environment.IsMacOS) {
19001900
"osx-x64"
19011901
}
19021902

@@ -1925,7 +1925,7 @@ function Start-CrossGen {
19251925
"clrjit.dll"
19261926
} elseif ($Environment.IsLinux) {
19271927
"libclrjit.so"
1928-
} elseif ($Environment.IsOSX) {
1928+
} elseif ($Environment.IsMacOS) {
19291929
"libclrjit.dylib"
19301930
}
19311931

docker/tests/containerTestCommon.psm1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function Set-RepoName
105105
function Test-SkipWindows
106106
{
107107
[bool] $canRunWindows = (Get-DockerEngineOs) -like 'Windows*'
108-
return ($IsLinux -or $IsOSX -or !$canRunWindows)
108+
return ($IsLinux -or $IsMacOS -or !$canRunWindows)
109109
}
110110

111111
function Test-SkipLinux

docs/learning-powershell/create-powershell-scripts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ If you would like to author one script that will return the IP address across Li
4444

4545
```PowerShell
4646
# Script to return current IPv4 addresses for Linux, MacOS, or Windows
47-
$IP = if ($IsLinux -or $IsOSX) {
47+
$IP = if ($IsLinux -or $IsMacOS) {
4848
$ipInfo = ifconfig | Select-String 'inet'
4949
$ipInfo = [regex]::matches($ipInfo,"addr:\b(?:\d{1,3}\.){3}\d{1,3}\b") | ForEach-Object value
5050
foreach ($ip in $ipInfo) {

docs/maintainers/releasing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ This is to help track the release preparation work.
3535
Delete the `docker` branch once the builds succeed.
3636
- Windows: queue a new build in `PowerShell Windows Docker Build` on VSTS.
3737
1. Verify the generated docker container images.
38-
1. [Update the homebrew formula](#homebrew) for the OSX package.
38+
1. [Update the homebrew formula](#homebrew) for the macOS package.
3939
This task usually will be taken care of by the community,
4040
so we can wait for one day or two and see if the homebrew formula has already been updated,
4141
and only do the update if it hasn't.
4242

4343
## Building Packages
4444

4545
> Note: Linux and Windows packages are taken care of by our release build pipeline in VSTS,
46-
while the OSX package needs to be built separately on a macOS.
46+
while the macOS package needs to be built separately on a macOS.
4747

4848
The release build should be started based on the `release` branch.
4949
The release Git tag won't be created until all release preparation tasks are done,

docs/testing-guidelines/TestRoadmap.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ This will provide us much needed visibility in how PowerShell Core is being used
1717
We already have infrastructure in place to allow us see how PowerShell Core is being used, by collecting telemetry from PowerShell Core, we can improve our confidence as we drive to production quality.
1818

1919
### Logging
20-
The code which on Windows create ETW logging has been completely stubbed out on Linux/OSX.
21-
We should take advantage of the native logging mechanisms on Linux/OSX and implement a logger similar to the ETW logger on Windows using Syslog (or equivalent).
20+
The code which on Windows create ETW logging has been completely stubbed out on Linux/macOS.
21+
We should take advantage of the native logging mechanisms on Linux/macOS and implement a logger similar to the ETW logger on Windows using Syslog (or equivalent).
2222
We could use this data during test runs to identify test gaps.
2323
Simply by capturing the cmdlets and their parameters which are invoked during test would illuminate the gaps we have in our current tests, and allow us to easily fill them.
2424
It is not sufficient to support only one platform because we have many tests which determine at runtime whether or not it should run based on OS, so data from Windows will not be the same as that from Linux or MacOS.
@@ -69,7 +69,7 @@ In addition to loopback tests using both WSMan and SSH protocols, we should have
6969
* Windows Client->Nano Server
7070
* Windows Client->Linux Server
7171
* Linux Client -> Windows Server
72-
* OSX Client -> Nano Client
72+
* macOS Client -> Nano Client
7373
* PowerShell Core Client -> Full PowerShell Server
7474
* Full PowerShell Client -> PowerShell Core Server
7575
* Downlevel Full PowerShell Client -> PowerShell Core Server

src/System.Management.Automation/CoreCLR/CorePsPlatform.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ public static bool IsLinux
3030
}
3131

3232
/// <summary>
33-
/// True if the current platform is OS X.
33+
/// True if the current platform is macOS.
3434
/// </summary>
35-
public static bool IsOSX
35+
public static bool IsMacOS
3636
{
3737
get
3838
{
@@ -605,7 +605,7 @@ internal static uint NonWindowsGetThreadId()
605605

606606
internal static int NonWindowsGetProcessParentPid(int pid)
607607
{
608-
return IsOSX ? Unix.NativeMethods.GetPPid(pid) : Unix.GetProcFSParentPid(pid);
608+
return IsMacOS ? Unix.NativeMethods.GetPPid(pid) : Unix.GetProcFSParentPid(pid);
609609
}
610610

611611
// Unix specific implementations of required functionality
@@ -710,7 +710,7 @@ internal static class NativeMethods
710710
{
711711
private const string psLib = "libpsl-native";
712712

713-
// Ansi is a misnomer, it is hardcoded to UTF-8 on Linux and OS X
713+
// Ansi is a misnomer, it is hardcoded to UTF-8 on Linux and macOS
714714

715715
// C bools are 1 byte and so must be marshaled as I1
716716

src/System.Management.Automation/engine/InitialSessionState.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4963,8 +4963,8 @@ .ForwardHelpCategory Cmdlet
49634963
ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope),
49644964

49654965
new SessionStateVariableEntry(
4966-
SpecialVariables.IsOSX,
4967-
Platform.IsOSX,
4966+
SpecialVariables.IsMacOS,
4967+
Platform.IsMacOS,
49684968
String.Empty,
49694969
ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope),
49704970

@@ -5138,9 +5138,9 @@ internal static SessionStateAliasEntry[] BuiltInAliases
51385138
"Invoke-RestMethod", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope),
51395139
new SessionStateAliasEntry("iwr",
51405140
"Invoke-WebRequest", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope),
5141-
// Porting note: #if !UNIX is used to disable aliases for cmdlets which conflict with Linux / OS X
5141+
// Porting note: #if !UNIX is used to disable aliases for cmdlets which conflict with Linux / macOS
51425142
#if !UNIX
5143-
// ac is a native command on OS X
5143+
// ac is a native command on macOS
51445144
new SessionStateAliasEntry("ac",
51455145
"Add-Content", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope),
51465146
new SessionStateAliasEntry("compare",

0 commit comments

Comments
 (0)