Skip to content

Commit 5b3b01c

Browse files
authoredMay 7, 2021
WSL: Ignore commented mount point lines in wsl.conf (#247)
1 parent ae885ad commit 5b3b01c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const getWslDrivesMountPoint = (() => {
4242
}
4343

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

4747
if (!configMountPoint) {
4848
return defaultMountPoint;

0 commit comments

Comments
 (0)
Please sign in to comment.