Skip to content

Add auth flag to list explicit output - #4358

Open
faze-geek wants to merge 1 commit into
mamba-org:mainfrom
faze-geek:add_list_auth
Open

Add auth flag to list explicit output#4358
faze-geek wants to merge 1 commit into
mamba-org:mainfrom
faze-geek:add_list_auth

Conversation

@faze-geek

Copy link
Copy Markdown
Contributor

Description

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::enhancements For enhancements PRs or implementing features label Jul 24, 2026
@faze-geek

Copy link
Copy Markdown
Contributor Author

Setup

# `list --auth` parity with `conda list --auth`
# Captured on macOS arm64, mamba 2.8.1. 
# Fake Conda token injected into an environment's `conda-meta` records:

https://conda.anaconda.org/t/abcd1234token/conda-forge/osx-arm64/xtensor-0.24.0-h1111111_0.conda

MAIN: no --auth flag, and --explicit leaks the token

$ mamba list -p $E --explicit --auth
The following argument was not expected: --auth

$ mamba list -p $E --explicit
https://conda.anaconda.org/t/abcd1234token/conda-forge/osx-arm64/xtensor-0.24.0-h1111111_0.conda
https://conda.anaconda.org/t/abcd1234token/conda-forge/osx-arm64/xtl-0.7.5-h2222222_0.conda

BRANCH: stripped by default, kept with --auth

$ mamba list -p $E --explicit
https://conda.anaconda.org/conda-forge/osx-arm64/xtensor-0.24.0-h1111111_0.conda
https://conda.anaconda.org/conda-forge/osx-arm64/xtl-0.7.5-h2222222_0.conda

$ mamba list -p $E --explicit --auth
https://conda.anaconda.org/t/abcd1234token/conda-forge/osx-arm64/xtensor-0.24.0-h1111111_0.conda
https://conda.anaconda.org/t/abcd1234token/conda-forge/osx-arm64/xtl-0.7.5-h2222222_0.conda

user:password handled the same way

$ mamba list -p $E --explicit
https://my.private.repo/conda-forge/osx-arm64/xtensor-0.24.0-h1111111_0.conda

$ mamba list -p $E --explicit --auth
https://user:pass@my.private.repo/conda-forge/osx-arm64/xtensor-0.24.0-h1111111_0.conda

Hash suffixes (--md5 / --sha256) preserved in both modes

$ mamba list -p $E --explicit --md5
...xtensor-0.24.0-h1111111_0.conda#0123456789abcdef0123456789abcdef

$ mamba list -p $E --explicit --md5 --auth
...t/abcd1234token/...xtensor-0.24.0-h1111111_0.conda#0123456789abcdef0123456789abcdef

Edge cases

# `--auth` without `--explicit` is ignored (warning) and the table still prints
$ mamba list -p $E --auth
warning libmamba Option --auth ignored because --explicit was not provided.
  xtensor  0.24.0  h1111111_0  conda-forge
  xtl      0.7.5   h2222222_0  conda-forge

# Clean URLs `--auth` is a no-op (no regression)
$ diff <(mamba list -p $C --explicit) <(mamba list -p $C --explicit --auth)
IDENTICAL for clean URLs (regression OK)

# Mutually-exclusive hashes still rejected
$ mamba list -p $E --explicit --md5 --sha256
critical libmamba Only one of --md5 and --sha256 can be specified at the same time.

@faze-geek

Copy link
Copy Markdown
Contributor Author

Hi @jjerphan, could you please check this out ? Thanks !

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

Labels

release::enhancements For enhancements PRs or implementing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant