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
Remove implicit dependency on wslvar binary (#198) #204
Conversation
I believe this would make 200 redundant (if accepted). |
const wslAutoMountRoot = async () => { | ||
let rootDirectory = '/mnt/'; | ||
try { | ||
const {stdout} = await pExecFile('awk', [ |
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.
Use JS for the parsing instead of awk
.
const paths = await pReaddir(rootDirectory); | ||
|
||
/* eslint-disable no-await-in-loop */ | ||
for (const path of paths) { |
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.
This can be done concurrently using Promise.all
.
Can you describe your changes and why they're required? |
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.
Since this already adds a detection for wslAutoMountRoot
, you could use that as well for the check on line 125 instead of hardcoding /mnt/
– that'd make my PR (#210) unnecessary :)
@tim-stasse Friendly bump :) |
@sindresorhus I think I can explain - An easy way to replace |
Fixes #198
Fixes #200