Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs regarding OS environment variables to include MacOS #736

Open
jacobq opened this issue Jul 15, 2020 · 2 comments
Open

Update docs regarding OS environment variables to include MacOS #736

jacobq opened this issue Jul 15, 2020 · 2 comments

Comments

@jacobq
Copy link
Contributor

jacobq commented Jul 15, 2020

In the "Running Windows and Linux builds side-by-side" section of Getting started with AppVeyor for Linux it mentions that in PowerShell we have the following:

$isLinux is $true on Linux
$isWindows is $true on Windows

and in general:

AppVeyor also introduces two new environment variables defining platform:

CI_WINDOWS is true if the build is running on Windows-based image; otherwise false.
CI_LINUX is true if the build is running on Linux-based image; otherwise false.

However, there is no mention of corresponding $isMacOS or CI_MACOS variables. Furthermore, it sounds like $isWindows may not work on Windows (see appveyor/ci#3214 (comment)).

@jacobq
Copy link
Contributor Author

jacobq commented Jul 15, 2020

FWIW, on the macos image I see the following:

worker-628-001:my-project appveyor$ pwsh -c Get-Variable

Name                           Value
----                           -----
...
IsCoreCLR                      True
IsLinux                        False
IsMacOS                        True
IsWindows                      False
...

and

worker-628-001:my-project appveyor$ env
...
CI_MACOS=true
...
CI=true
...
CI_FREEBSD=false
...
CI_WINDOWS=false
...

@jacobq
Copy link
Contributor Author

jacobq commented Jul 15, 2020

It would be nice if the docs also clarified which variables are added by AppVeyor vs. being present already, e.g. https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-7#islinux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant