From 8194fa0379c6267c1c267c01adbd3c72a2d91454 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=87=AA=E5=BC=BA?= <43063927+LZQCN@users.noreply.github.com> Date: Mon, 14 Aug 2023 18:07:10 +0800 Subject: [PATCH] Update downloadsUrl to prioritize .npmrc variable This commit updates the `downloadsUrl` variable to prioritize the value from the `.npmrc` file if it exists. The updated code checks `process.env.npm_config_ffmpeg_binaries_url` first and if it's not set, then it falls back to `process.env[BINARIES_URL_ENV_VAR]` or the default value if none of the variables are set. This change allows for more flexibility and customization when it comes to configuring the download URL for ffmpeg binaries. --- install.js | 1 + 1 file changed, 1 insertion(+) diff --git a/install.js b/install.js index 1d39b15..fd75366 100644 --- a/install.js +++ b/install.js @@ -167,6 +167,7 @@ const release = ( const arch = process.env.npm_config_arch || os.arch() const platform = process.env.npm_config_platform || os.platform() const downloadsUrl = ( + process.env.npm_config_ffmpeg_binaries_url || process.env[BINARIES_URL_ENV_VAR] || 'https://github.com/eugeneware/ffmpeg-static/releases/download' )