8000 The $IsLinux variable is set to true on non-Linux platforms · Issue #24257 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

The $IsLinux variable is set to true on non-Linux platforms #24257

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

Closed
5 tasks done
rhubarb-geek-nz opened this issue Sep 6, 2024 · 4 comments
Closed
5 tasks done

The $IsLinux variable is set to true on non-Linux platforms #24257

rhubarb-geek-nz opened this issue Sep 6, 2024 · 4 comments

Comments

@rhubarb-geek-nz
Copy link

Prerequisites

Steps to reproduce

I am running PowerShell as a native FreeBSD build using RID "freebsd-x64" and "freebsd-arm64".

Expected behavior

I would expect when on FreeBSD for $IsLinux to be false

I would expect $IsLinux to have the same value as [System.OperatingSystem]::IsLinux()

Actual behavior

PS> @{ IsWindows=$IsWindows;IsLinux=$IsLinux;IsMacOS=$IsMacOS }

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

PS> [System.OperatingSystem]::IsLinux()
False
PS> [System.OperatingSystem]::IsFreeBSD()
True

Error details

no actual error

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.5
PSEdition                      Core
GitCommitId                    7.4.5
OS                             FreeBSD 13.3-RELEASE FreeBSD 13.3-RELEASE releng/13.3-n257428-80d2b634ddf0 GENERIC
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0â€}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

@rhubarb-geek-nz rhubarb-geek-nz added the Needs-Triage The issue is new and needs to be triaged by a work group. label Sep 6, 2024
@kasini3000
Copy link

good,It is time to new an automatic variable for freebsd: $IsFreeBsd
for next:
After conducting a period of testing, find a way to let the compile into freebsd ports

@iSazonov
Copy link
Collaborator
iSazonov commented Sep 9, 2024
I would expect $IsLinux to have the same value as [System.OperatingSystem]::IsLinux()

It is exactly so in pwsh code.

It is time to new an automatic variable for freebsd: $IsFreeBsd

Will be in #20041

@rhubarb-geek-nz
Copy link
Author

That is excellent news!

Copy link
Contributor
microsoft-github-policy-service bot commented Sep 9, 2024

📣 Hey @rhubarb-geek-nz, how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Triage The issue is new and needs to be triaged by a work group. label Sep 9, 2024
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

3 participants
0