Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix install using explicit url #3710

Merged
merged 8 commits into from
Jan 6, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Modify condition for OCI
  • Loading branch information
Hind-M committed Jan 3, 2025
commit c16e54c8ad4475c10371868bff3082bdaa0733ab
16 changes: 12 additions & 4 deletions libmamba/src/core/package_fetcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,15 @@ namespace mamba
std::string PackageFetcher::channel() const
{
// Note that in the oci case, the pkg url also implicitly starts with "https://"
// but should be included in the first case (with the url containing "ghcr" condition)
// but should be included in the first case
// (with the url starting with "https://pkg-containers.githubusercontent.com/" condition)
// TODO We should maybe think of a cleaner way of differentiating all this
if (!util::starts_with(m_package_info.package_url, "file://")
&& (!util::starts_with(m_package_info.package_url, "https://")
|| util::contains(m_package_info.package_url, "ghcr")))
|| util::starts_with(
m_package_info.package_url,
"https://pkg-containers.githubusercontent.com/"
Hind-M marked this conversation as resolved.
Show resolved Hide resolved
)))
{
return m_package_info.channel;
}
Expand All @@ -345,11 +349,15 @@ namespace mamba
std::string PackageFetcher::url_path() const
{
// Note that in the oci case, the pkg url also implicitly starts with "https://"
// but should be included in the first case (with the url containing "ghcr" condition)
// but should be included in the first case
// (with the url starting with "https://pkg-containers.githubusercontent.com/" condition)
// TODO We should maybe think of a cleaner way of differentiating all this
if (!util::starts_with(m_package_info.package_url, "file://")
&& (!util::starts_with(m_package_info.package_url, "https://")
|| util::contains(m_package_info.package_url, "ghcr")))
|| util::starts_with(
m_package_info.package_url,
"https://pkg-containers.githubusercontent.com/"
)))
{
return util::concat(m_package_info.platform, '/', m_package_info.filename);
}
Expand Down