Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Arslan <ararslan@comcast.net>
  • Loading branch information
inkydragon and ararslan authored Jan 17, 2025
1 parent 60122cd commit a0ca47f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions base/sysinfo.jl
Original file line number Diff line number Diff line change
@@ -546,13 +546,13 @@ Windows Subsystem for Linux (WSL).
!!! compat "Julia 1.12"
This function requires at least Julia 1.12.
"""
function detectwsl(os::Symbol)
islinux(os) &&
function detectwsl()
islinux() &&
isfile("/proc/sys/kernel/osrelease") &&
contains(read("/proc/sys/kernel/osrelease", String), r"Microsoft|WSL"i)
end

for f in (:detectwsl, :isunix, :islinux, :isbsd, :isapple, :iswindows, :isfreebsd, :isopenbsd, :isnetbsd, :isdragonfly, :isjsvm)
for f in (:isunix, :islinux, :isbsd, :isapple, :iswindows, :isfreebsd, :isopenbsd, :isnetbsd, :isdragonfly, :isjsvm)
@eval $f() = $(getfield(@__MODULE__, f)(KERNEL))
end

0 comments on commit a0ca47f

Please sign in to comment.