-
Notifications
You must be signed in to change notification settings - Fork 11
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
Support Windows Subsystem for Linux #10
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.
Looks good, would be good to have this one change though.
src/extension.ts
Outdated
|
||
const lowerCase = windowsShellPath.toLowerCase(); | ||
|
||
return (lowerCase.indexOf('system32') !== -1) && (lowerCase.indexOf('bash') !== -1); |
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.
We could probably make this detection a little better by checking if Windows is running in WoW64 mode (more info) and also using %windir%
, you can see how this is done in VS Code here:
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.
Agree. Seeing the reference, I feel that there's no common module that detects bash used in the target system. But in this case, I can implement the detection in the same way, and refer to the source code from src/extension.ts
. Let me make another commit for it.
4ef3ca4
to
eb9c7dc
Compare
Fixes Tyriar#5 Determine the bash path by checking Windows shell path in config.
eb9c7dc
to
80291e6
Compare
@Tyriar I fixed the issue according to your review, but amended the commit instead of making new one. Because the new commit wouldn't help others. And the test result is same as before. |
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.
Thanks!
Fixes #5
It determines the directory path by checking Windows shell path.
The shell paths are listed in the official VS Code page.
https://code.visualstudio.com/docs/editor/integrated-terminal
Please kindly consider this pull request to be merged, I really need this feature.
Screen captures of the actual usages: