aboutsummaryrefslogtreecommitdiff
path: root/src/install/npm.zig
diff options
context:
space:
mode:
authorGravatar Alex Lam S.L <alexlamsl@gmail.com> 2022-12-26 10:25:59 +0200
committerGravatar GitHub <noreply@github.com> 2022-12-26 00:25:59 -0800
commitd94b96d9f440d3aeef4402aec9f3788bca2972d0 (patch)
tree8002c06135f5b247b210b85ef2602cc794f097fd /src/install/npm.zig
parent74251fbf5e011191721c96ea520f29a7cc4ea94a (diff)
downloadbun-d94b96d9f440d3aeef4402aec9f3788bca2972d0.tar.gz
bun-d94b96d9f440d3aeef4402aec9f3788bca2972d0.tar.zst
bun-d94b96d9f440d3aeef4402aec9f3788bca2972d0.zip
[install] use specified base URL as default fallback within scopes (#1665)
Diffstat (limited to 'src/install/npm.zig')
-rw-r--r--src/install/npm.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/install/npm.zig b/src/install/npm.zig
index 3874c2c01..60ffefdbb 100644
--- a/src/install/npm.zig
+++ b/src/install/npm.zig
@@ -35,7 +35,7 @@ const ComptimeStringMap = @import("../comptime_string_map.zig").ComptimeStringMa
const Npm = @This();
pub const Registry = struct {
- pub const DefaultURL = "https://registry.npmjs.org/";
+ pub const default_url = "https://registry.npmjs.org/";
pub const BodyPool = ObjectPool(MutableString, MutableString.init2048, true, 8);
pub const Scope = struct {
@@ -67,7 +67,7 @@ pub const Registry = struct {
pub fn fromAPI(name: string, registry_: Api.NpmRegistry, allocator: std.mem.Allocator, env: *DotEnv.Loader) !Scope {
var registry = registry_;
- var url = URL.parse(if (registry.url.len == 0) DefaultURL else registry.url);
+ var url = URL.parse(registry.url);
var auth: string = "";
if (registry.token.len == 0) {