-
Notifications
You must be signed in to change notification settings - Fork 161
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
Add ARCH_IS_WSL
to detect Windows Subsystem for Linux
#4249
Conversation
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.
Nice. I've got no suggestions on the code but I do have a cosmetic nitpick on the doc.
Just wondering, how is this related to PR #3939? |
This is unrelated to cygwin changes (although in the long term, the plan is the two distros will come closer together. This will be one place where they differ, as they have different ways of spawning files in windows) |
7729843
to
b558690
Compare
Codecov Report
@@ Coverage Diff @@
## master #4249 +/- ##
==========================================
- Coverage 82.26% 81.90% -0.36%
==========================================
Files 686 682 -4
Lines 296672 294708 -1964
==========================================
- Hits 244045 241393 -2652
- Misses 52627 53315 +688
|
Hopefully all cleaned up now. I decided not to fix other true, I thought they could be sweeped (also false) in another PR. |
Sure, thanks Chris. I'll merge this when the tests pass. |
ARCH_IS_WSL
to detect Windows Subsystem for Linux
This lets us detect the "Windows Subsystem for Linux".
I realise in some ways the naming has gotten weird now, we call Cygwin (one linux in windows) "ARCH_IS_WINDOWS", which WSL is not. While that is weird, I think it makes sense, WSL is a complete install of Linux (usually Ubuntu).
The only time we need ARCH_IS_WSL is when we want to open GUI programs -- I've added help viewers (unfortunately it doesn't seem possible to open either anchors in HTML, which makes this much less useful. I spent some time searching the internet, but everything people say seems to not work in practice, except making a new webpage which just forwards to the anchor, and I didn't want to do that as it would create lots of new temp files/directories).
I plan on using this in the 'profiling' package too, to automatically open HTML pages (I originally wrote this in that package, then thought I might be generally useful).