-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Introduce Sys.isWSL() #56671
Introduce Sys.isWSL() #56671
Conversation
Seems to me that you are replacing Sys.iswindows rather than creating Sys.isWSL ? |
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 | ||
isWSL(os::Symbol) = ispath("/proc/sys/fs/binfmt_misc/WSLInterop") # WSL sigil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think putting a comment there might break the docstring lookup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, why camelcase which isn't used anywhere in Julia?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, you aren't using the input argument, besides not defining the method you try to use elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes like this seems better:
#36354 (comment)
How about Sys.detectwsl?
I'll just abandon this/make a draft, since there's this other PR. If I don't see it move then I may work on it here later. There one implementation here outside of Julia:
https://github.com/tpapp/DefaultApplication.jl/pull/17/files
See #36425 |
Closing as per this comment
It doesn't make sense to keep open a pull request which is abandoned by its own author, and which is broken on multiple levels (inconsistent style, bad naming, broken implementation, can't even agree between the method introduced and the method called) in just two lines of code. |
No description provided.