mamba-org / mamba

The Fast Cross-Platform Package Manager
https://mamba.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6.96k stars 359 forks source link

fix: Export `'channels'` as part of environments' export #3587

Closed mathbunnyru closed 1 week ago

mathbunnyru commented 2 weeks ago

If I run the following:

mamba env create --name empty
mamba env export --name empty

it will give me:

name: empty
channels:
dependencies:

prefix: "/Users/asalikhov/test-mamba-root/envs/empty"

Note: channels, dependencies are always printed, even if empty.

But if I run export with --json, it will not print channels::

{
  "dependencies": [
  ],
  "name": "empty",
  "prefix": "/Users/asalikhov/test-mamba-root/envs/empty"
}

I think it's always good to print channels, it makes parsing easier.

Related: https://github.com/mamba-org/mamba/issues/3582

mathbunnyru commented 1 week ago

I think the CI failure is spurious and this can be merged