Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Hind-M committed Dec 26, 2024
1 parent fa7ee00 commit f69c65c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libmamba/src/core/package_fetcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ 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)
// 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")))
Expand All @@ -341,6 +344,9 @@ 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)
// 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")))
Expand Down

0 comments on commit f69c65c

Please sign in to comment.