Skip to content

Commit

Permalink
Update sysinfo.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
PallHaraldsson authored Nov 24, 2024
1 parent 9c719dc commit 2f976f3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion base/sysinfo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ A symbol representing the architecture of the build configuration.
"""
const ARCH = ccall(:jl_get_ARCH, Any, ())::Symbol


"""
Sys.KERNEL::Symbol
Expand Down Expand Up @@ -513,6 +512,19 @@ See documentation in [Handling Operating System Variation](@ref).
"""
iswindows(os::Symbol) = (os === :Windows || os === :NT)

"""
Sys.isWSL([os])
Predicate for testing if the OS is the Windows subsystem for Linux (version 2 or the original),
running under a derivative of Microsoft Windows NT.
See documentation in [Handling Operating System Variation](@ref).
!!! compat "Julia 1.12"
This function requires at least Julia 1.12.
"""
# https://superuser.com/questions/1749781/how-can-i-check-if-the-environment-is-wsl-from-a-shell-script

Check warning on line 525 in base/sysinfo.jl

View workflow job for this annotation

GitHub Actions / Check whitespace

Whitespace check

trailing whitespace
iswindows(os::Symbol) = ispath("/proc/sys/fs/binfmt_misc/WSLInterop") # WSL sigil

"""
Sys.isapple([os])
Expand Down

0 comments on commit 2f976f3

Please sign in to comment.