Skip to content

Commit

Permalink
WSL: Ignore commented mount point lines in wsl.conf (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
haroonrafi committed May 7, 2021
1 parent ae885ad commit 5b3b01c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -42,7 +42,7 @@ const getWslDrivesMountPoint = (() => {
}

const configContent = await fs.readFile(configFilePath, {encoding: 'utf8'});
const configMountPoint = /root\s*=\s*(?<mountPoint>.*)/g.exec(configContent);
const configMountPoint = /(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(configContent);

if (!configMountPoint) {
return defaultMountPoint;
Expand Down

0 comments on commit 5b3b01c

Please sign in to comment.