Skip to content

Fix conda activate for conda>=25.11 - #1222

Merged
fdncred merged 1 commit into
nushell:mainfrom
Zaubentrucker:fix/conda-activate
Feb 12, 2026
Merged

fdncred merged 1 commit into
nushell:mainfrom
Zaubentrucker:fix/conda-activate

Conversation

@Zaubentrucker

Copy link
Copy Markdown
Contributor

From conda version 25.11, the conda info --envs --json command no longer contains the env_dirs field, as described in conda/conda#15353.

This would cause the conda activate <env-name> command in this script to always fail.:

~> conda activate test
Error: nu::shell::name_not_found

  × Name not found
    ╭─[C:\Users\zaubentrucker\AppData\Roaming\nushell\scripts\conda.nu:98:21]
 97 │     let env_dirs = (
 98 │         $conda_info.envs_dirs |
    ·                     ────┬────
    ·                         ╰── did you mean 'envs_details'?
 99 │         each { || path join $env_name }
    ╰────

~>  

The missing info is still contained in conda info --json however, so we can just switch to that.

From conda version 25.11, the `conda info --envs --json` command
no longer contains the `env_dirs` field, as described in
conda/conda#15353. This info is still contained
in `conda info --json` however.
@fdncred
fdncred merged commit cc94140 into nushell:main Feb 12, 2026
1 check passed
@fdncred

fdncred commented Feb 12, 2026

Copy link
Copy Markdown
Contributor

Thanks

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants