Skip to content

Conversation

@jjerphan
Copy link
Member

@jjerphan jjerphan commented Nov 24, 2025

Description

Toward resolving conda-forge/mamba-feedstock#362.

Type of Change

  • Bugfix
  • Feature / enhancement
  • CI / Documentation
  • Maintenance

Checklist

  • My code follows the general style and conventions of the codebase, ensuring consistency
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have run pre-commit run --all locally in the source folder and confirmed that there are no linter errors.
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes

@github-actions github-actions bot added the release::bug_fixes For PRs fixing bugs label Nov 24, 2025
@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

❌ Patch coverage is 64.28571% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.59%. Comparing base (6f11ca2) to head (6750848).

Files with missing lines Patch % Lines
libmamba/src/download/downloader.cpp 64.28% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4101      +/-   ##
==========================================
+ Coverage   63.57%   63.59%   +0.01%     
==========================================
  Files         315      315              
  Lines       38562    38572      +10     
  Branches     2950     2951       +1     
==========================================
+ Hits        24517    24529      +12     
+ Misses      13976    13974       -2     
  Partials       69       69              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jjerphan jjerphan force-pushed the fix/ca-certificate-local-env branch 3 times, most recently from 0cde832 to 091170f Compare November 24, 2025 16:15
@jjerphan jjerphan marked this pull request as ready for review November 24, 2025 16:16
@jjerphan jjerphan force-pushed the fix/ca-certificate-local-env branch 4 times, most recently from 9193b95 to 97bac5d Compare November 25, 2025 09:09
@jjerphan jjerphan force-pushed the fix/ca-certificate-local-env branch from 97bac5d to 6750848 Compare November 25, 2025 10:21
// `mamba` or `micromamba` is installed at:
// - `${PREFIX}/bin/{mamba,micromamba}` on Unix
// - `${PREFIX}/Library/bin/{mamba,micromamba}.exe` on Windows
const fs::u8path env_prefix
Copy link
Member

Choose a reason for hiding this comment

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

This whole block is extracted from get_root_prefix right?

// Find the supposed environment prefix of libmamba.
// `libmamba` is installed at:
// - `${PREFIX}/lib/libmamba${SHLIB_EXT}` on Unix
// - `${PREFIX}/Library/bin/libmamba$.dll` on Windows
const fs::u8path libmamba_env_prefix = fs::weakly_canonical(
util::on_win ? libmamba_path.parent_path().parent_path().parent_path()
: libmamba_path.parent_path().parent_path()
);

I would prefer if you factorize that in a function called here and in get_root_prefix.

Also, I think this is a bit fragile: is that supposed to work with micromamba which can be installed in any place (my micromamba never has ../bin as an example) and doesnt have a libmamba install?

Isnt there an env variable already for the env prefix? Or we really want the one from the executable here?

I see we later check the existence of this path so maybe it's not important and it's Ok with micromamba, just asking to be sure. :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, I think this is a bit fragile: is that supposed to work with micromamba which can be installed in any place (my micromamba never has ../bin as an example) and doesnt have a libmamba install?

This is only meant to support a new use-case (see conda-forge/mamba-feedstock#362 (comment)).

Isnt there an env variable already for the env prefix? Or we really want the one from the executable here?

I do not think we can expect that an environment variable is set for the use-case given above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release::bug_fixes For PRs fixing bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants