Skip to content

Commit

Permalink
homebrew-bottles: Encode url in list cask source
Browse files Browse the repository at this point in the history
  • Loading branch information
taoky committed Dec 4, 2024
1 parent e0d48bc commit 941f081
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
9 changes: 8 additions & 1 deletion homebrew-bottles/bottles-json/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion homebrew-bottles/bottles-json/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ strip = "symbols"
clap = { version = "4.1.4", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

urlencoding = "2.1.3"
6 changes: 4 additions & 2 deletions homebrew-bottles/bottles-json/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,11 @@ fn main() {
.unwrap()
.to_str()
.unwrap();
let url = format!("https://formulae.brew.sh/api/cask-source/{}", filename);
let url = urlencoding::encode(&url);
println!(
"{} https://formulae.brew.sh/api/cask-source/{} {}",
f.ruby_source_checksum.sha256, filename, filename
"{} {} {}",
f.ruby_source_checksum.sha256, url, filename
);
}
}
Expand Down

0 comments on commit 941f081

Please sign in to comment.