Skip to content

Commit

Permalink
Fix getting WSL mount point on Windows (#243)
Browse files Browse the repository at this point in the history
  • Loading branch information
mingzz committed Apr 16, 2021
1 parent 45a3551 commit 4ab321b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
@@ -1,6 +1,6 @@
const path = require('path');
const childProcess = require('child_process');
const {promises: fs} = require('fs');
const {promises: fs, constants: fsConstants} = require('fs');
const isWsl = require('is-wsl');
const isDocker = require('is-docker');
const defineLazyProperty = require('define-lazy-prop');
Expand Down Expand Up @@ -33,7 +33,7 @@ const getWslDrivesMountPoint = (() => {

let isConfigFileExists = false;
try {
await fs.access(configFilePath, fs.constants.F_OK);
await fs.access(configFilePath, fsConstants.F_OK);
isConfigFileExists = true;
} catch {}

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

Expand Down

0 comments on commit 4ab321b

Please sign in to comment.