Skip to content

Commit

Permalink
Remove warning for unused registry options from npmrc (#14813)
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan-conway authored Oct 25, 2024
1 parent ec4c9f8 commit 61534c7
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/ini.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1159,7 +1159,6 @@ pub fn loadNpmrc(
continue;
}

var matched_at_least_one = false;
for (registry_map.scopes.keys(), registry_map.scopes.values()) |*k, *v| {
const url = url_map.get(k.*) orelse unreachable;

Expand All @@ -1169,7 +1168,6 @@ pub fn loadNpmrc(
continue;
}
}
matched_at_least_one = true;
switch (conf_item.optname) {
._authToken => {
if (conf_item.dupeValueDecoded(allocator, log, source)) |x| v.token = x;
Expand All @@ -1189,19 +1187,6 @@ pub fn loadNpmrc(
continue;
}
}

if (!matched_at_least_one) {
log.addWarningFmt(
source,
iter.config.properties.at(iter.prop_idx - 1).key.?.loc,
allocator,
"The following .npmrc registry option was not applied:\n\n <b>{s}<r>\n\nBecause we couldn't find the registry: <b>{s}<r>.",
.{
conf_item,
conf_item.registry_url,
},
) catch bun.outOfMemory();
}
}
}
}
Expand Down

0 comments on commit 61534c7

Please sign in to comment.