aports/testing/fnm/mirror.patch
2024-07-02 19:31:01 +00:00

37 lines
1.5 KiB
Diff

Get pre-built from https://unofficial-builds.nodejs.org (only provides x64)
diff --git a/src/config.rs b/src/config.rs
index df65675..6e2dba9 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -11,7 +11,7 @@ pub struct FnmConfig {
#[clap(
long,
env = "FNM_NODE_DIST_MIRROR",
- default_value = "https://nodejs.org/dist",
+ default_value = "https://unofficial-builds.nodejs.org/download/release",
global = true,
hide_env_values = true
)]
@@ -95,7 +95,7 @@ pub struct FnmConfig {
impl Default for FnmConfig {
fn default() -> Self {
Self {
- node_dist_mirror: Url::parse("https://nodejs.org/dist/").unwrap(),
+ node_dist_mirror: Url::parse("https://unofficial-builds.nodejs.org/download/release").unwrap(),
base_dir: None,
multishell_path: None,
log_level: LogLevel::Info,
diff --git a/src/downloader.rs b/src/downloader.rs
index a020f57..bcd98c6 100644
--- a/src/downloader.rs
+++ b/src/downloader.rs
@@ -178,7 +178,7 @@ mod tests {
fn install_in(path: &Path) -> PathBuf {
let version = Version::parse("12.0.0").unwrap();
let arch = Arch::X64;
- let node_dist_mirror = Url::parse("https://nodejs.org/dist/").unwrap();
+ let node_dist_mirror = Url::parse("https://unofficial-builds.nodejs.org/download/release").unwrap();
install_node_dist(&version, &node_dist_mirror, path, &arch, false)
.expect("Can't install Node 12");