mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 20:38:55 +00:00
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 https://github.com/denoland/deno/issues/26576
This commit is contained in:
parent
3b28446000
commit
c8d229dbf0
@ -193,10 +193,16 @@ impl ProgressBarRenderer for TextOnlyProgressBarRenderer {
|
||||
}
|
||||
};
|
||||
|
||||
// TODO(@marvinhagemeister): We're trying to reconstruct the original
|
||||
// specifier from the resolved one, but we lack the information about
|
||||
// private registries URLs and other things here.
|
||||
let message = display_entry
|
||||
.message
|
||||
.replace("https://registry.npmjs.org/", "npm:")
|
||||
.replace("https://jsr.io/", "jsr:");
|
||||
.replace("https://jsr.io/", "jsr:")
|
||||
.replace("%2f", "/")
|
||||
.replace("%2F", "/");
|
||||
|
||||
display_str.push_str(
|
||||
&colors::gray(format!(" - {}{}\n", message, bytes_text)).to_string(),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user