Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Escape URLs before adding them to bazel rules
Currently we produce the final URL by performing string concatenation, which works fine in most cases. The URL, however, might contain special characters that bazel is later unable to process correctly. One such example: Error downloading passt-0^20221110.g4129764-1.el9.x86_64.rpm: Illegal character in path at index 78: https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/passt-0^20221110.g4129764-1.el9.x86_64.rpm This issue made it necessary to manually tweak the WORKSPACE file generated by bazeldnf: kubevirt/kubevirt@8052a7f To solve this entire class of issues, use the functionality offered by the net/url package to manipulare URLs. This will automatically take care of performing all the necessary escaping, as well as avoiding unnecessary slashes. Signed-off-by: Andrea Bolognani <[email protected]>
- Loading branch information