Skip to content

Commit febb9d3

Browse files
pos777ljharb
authored andcommitted
[Fix] support windows virtual drive paths
1 parent 4e183d7 commit febb9d3

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

appveyor.yml

+5
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,9 @@ test_script:
7373
- node --version
7474
- npm --version
7575
# run tests
76+
- cd
77+
- npm run tests-only
78+
- 'subst X: ..'
79+
- 'cd /d X:\resolve'
80+
- cd
7681
- npm run tests-only

lib/async.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var nodeModulesPaths = require('./node-modules-paths');
66
var normalizeOptions = require('./normalize-options');
77
var isCore = require('is-core-module');
88

9-
var realpathFS = fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath;
9+
var realpathFS = process.platform !== 'win32' && fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath;
1010

1111
var homedir = getHomedir();
1212
var defaultPaths = function () {

lib/sync.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var caller = require('./caller');
66
var nodeModulesPaths = require('./node-modules-paths');
77
var normalizeOptions = require('./normalize-options');
88

9-
var realpathFS = fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync;
9+
var realpathFS = process.platform !== 'win32' && fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync;
1010

1111
var homedir = getHomedir();
1212
var defaultPaths = function () {

0 commit comments

Comments
 (0)