Skip to content

Commit c8d229d

Browse files
fix(install): percent encodings in interactive progress bar (#26600)
Fixes percent encodings showing up when installing scoped packages via `deno add` or `deno install`. The issue is caused by us trying to map back the package name from the resolved http url. This doesn't and has never worked with private registries. The proper solution would be to pass the original specifier into here, but that's a bit of a bigger refactor. So for now the quickest workaround is to replace `%2f` back to `/`. Fixes #26576
1 parent 3b28446 commit c8d229d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cli/util/progress_bar/renderer.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,16 @@ impl ProgressBarRenderer for TextOnlyProgressBarRenderer {
193193
}
194194
};
195195

196+
// TODO(@marvinhagemeister): We're trying to reconstruct the original
197+
// specifier from the resolved one, but we lack the information about
198+
// private registries URLs and other things here.
196199
let message = display_entry
197200
.message
198201
.replace("https://registry.npmjs.org/", "npm:")
199-
.replace("https://jsr.io/", "jsr:");
202+
.replace("https://jsr.io/", "jsr:")
203+
.replace("%2f", "/")
204+
.replace("%2F", "/");
205+
200206
display_str.push_str(
201207
&colors::gray(format!(" - {}{}\n", message, bytes_text)).to_string(),
202208
);

0 commit comments

Comments
 (0)