From f29fcb1f730aa2fdfd854614bfe7d1c422895814 Mon Sep 17 00:00:00 2001 From: Dumitru Date: Wed, 29 Apr 2020 20:24:27 +0300 Subject: [PATCH] Ensure npm platform flag is respected when copying DLLs --- install/dll-copy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/dll-copy.js b/install/dll-copy.js index eac3cfcc..e4b66464 100644 --- a/install/dll-copy.js +++ b/install/dll-copy.js @@ -6,7 +6,8 @@ const path = require('path'); const libvips = require('../lib/libvips'); const npmLog = require('npmlog'); -if (process.platform === 'win32') { +const platform = process.env.npm_config_platform || process.platform; +if (platform === 'win32') { const buildDir = path.join(__dirname, '..', 'build'); const buildReleaseDir = path.join(buildDir, 'Release'); npmLog.info('sharp', `Creating ${buildReleaseDir}`);