Skip to content
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions e2e/backend/test_aqua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ test aqua:crate-ci/[email protected] "typos --version" "typos-cli 1.27.3"
test aqua:biomejs/[email protected] "biome --version" "Version: 2.0.0"
test aqua:biomejs/biome@@biomejs/[email protected] "biome --version" "Version: 2.0.0"
test aqua:gruntwork-io/[email protected] "terragrunt --version" "terragrunt version v0.77.22"
test aqua:gitea.com/gitea/[email protected] "tea --version" $'Version: \e[1m0.9.2\e[0m'

assert_contains "MISE_USE_VERSIONS_HOST=0 mise ls-remote aqua:sharkdp/hyperfine" "1.9.0
1.10.0"
7 changes: 6 additions & 1 deletion src/backend/aqua.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,12 @@ impl AquaBackend {
}
AquaPackageType::Http => {
let url = pkg.url(v)?;
HTTP.head(&url).await?;
// Gitea doesn't support HEAD requests for attachments, so use GET instead
if url.contains("gitea.com") {
Copy link

Copilot AI Jul 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using url.contains("gitea.com") may unintentionally match substrings in paths or query parameters. Consider parsing the URL with a proper URL parser (e.g., url::Url::parse(&url)) and checking the host directly to ensure accuracy.

Copilot uses AI. Check for mistakes.
HTTP.get_async(&url).await?;
} else {
HTTP.head(&url).await?;
}
Ok(url)
}
AquaPackageType::Cargo => {
Expand Down
Loading