Skip to content

Commit 4ab321b

Browse files
authored
Fix getting WSL mount point on Windows (#243)
1 parent 45a3551 commit 4ab321b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const path = require('path');
22
const childProcess = require('child_process');
3-
const {promises: fs} = require('fs');
3+
const {promises: fs, constants: fsConstants} = require('fs');
44
const isWsl = require('is-wsl');
55
const isDocker = require('is-docker');
66
const defineLazyProperty = require('define-lazy-prop');
@@ -33,7 +33,7 @@ const getWslDrivesMountPoint = (() => {
3333

3434
let isConfigFileExists = false;
3535
try {
36-
await fs.access(configFilePath, fs.constants.F_OK);
36+
await fs.access(configFilePath, fsConstants.F_OK);
3737
isConfigFileExists = true;
3838
} catch {}
3939

@@ -171,7 +171,7 @@ const open = async (target, options) => {
171171
// Check if local `xdg-open` exists and is executable.
172172
let exeLocalXdgOpen = false;
173173
try {
174-
await fs.access(localXdgOpenPath, fs.constants.X_OK);
174+
await fs.access(localXdgOpenPath, fsConstants.X_OK);
175175
exeLocalXdgOpen = true;
176176
} catch {}
177177

0 commit comments

Comments
 (0)