diff --git a/index.js b/index.js index 3df086b..0a1cb2f 100644 --- a/index.js +++ b/index.js @@ -26,8 +26,8 @@ if (process.env[BINARY_PATH_ENV_VAR]) { win32: ['x64', 'ia32'] }) - var platform = process.env.npm_config_platform || os.platform() - var arch = process.env.npm_config_arch || os.arch() + var platform = process.env.npm_config_os || process.env.npm_config_platform || os.platform() + var arch = process.env.npm_config_cpu || process.env.npm_config_arch || os.arch() let binaryPath = path.join( __dirname, diff --git a/install.js b/install.js index 1d39b15..e380950 100644 --- a/install.js +++ b/install.js @@ -164,8 +164,8 @@ const release = ( process.env[RELEASE_ENV_VAR] || pkg[pkg.name]['binary-release-tag'] ) -const arch = process.env.npm_config_arch || os.arch() -const platform = process.env.npm_config_platform || os.platform() +const arch = process.env.npm_config_cpu || process.env.npm_config_arch || os.arch() +const platform = process.env.npm_config_os || process.env.npm_config_platform || os.platform() const downloadsUrl = ( process.env[BINARIES_URL_ENV_VAR] || 'https://github.com/eugeneware/ffmpeg-static/releases/download'