From febb9d37f21d4a9a4c81dfd60a86a86c39292598 Mon Sep 17 00:00:00 2001 From: Ilya Pospelov Date: Mon, 23 May 2022 14:57:26 +0300 Subject: [PATCH] [Fix] support windows virtual drive paths --- appveyor.yml | 5 +++++ lib/async.js | 2 +- lib/sync.js | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index f74b7b8..7937eac 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -73,4 +73,9 @@ test_script: - node --version - npm --version # run tests + - cd + - npm run tests-only + - 'subst X: ..' + - 'cd /d X:\resolve' + - cd - npm run tests-only diff --git a/lib/async.js b/lib/async.js index b56485c..07f18a6 100644 --- a/lib/async.js +++ b/lib/async.js @@ -6,7 +6,7 @@ var nodeModulesPaths = require('./node-modules-paths'); var normalizeOptions = require('./normalize-options'); var isCore = require('is-core-module'); -var realpathFS = fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; +var realpathFS = process.platform !== 'win32' && fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath; var homedir = getHomedir(); var defaultPaths = function () { diff --git a/lib/sync.js b/lib/sync.js index 72c69ba..ddc468a 100644 --- a/lib/sync.js +++ b/lib/sync.js @@ -6,7 +6,7 @@ var caller = require('./caller'); var nodeModulesPaths = require('./node-modules-paths'); var normalizeOptions = require('./normalize-options'); -var realpathFS = fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; +var realpathFS = process.platform !== 'win32' && fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync; var homedir = getHomedir(); var defaultPaths = function () {