diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 754054a812..8d15034063 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -259,6 +259,12 @@ jobs: pip install git+https://github.com/conda/conda-content-trust.git@main ./testserver.sh + + - name: Shell init + shell: bash -l {0} -euo pipefail -x + run: | + mamba init + - name: Cleanup shell: bash if: always() diff --git a/mamba/mamba/mamba_shell_init.py b/mamba/mamba/mamba_shell_init.py index 965ce69c4d..03f22e94bf 100644 --- a/mamba/mamba/mamba_shell_init.py +++ b/mamba/mamba/mamba_shell_init.py @@ -84,7 +84,8 @@ def shell_init(args): for_user = args.user if not (args.install and args.user and args.system): for_user = True - if args.no_user: + # no_user removed in Conda 23.1.0, see https://github.com/mamba-org/mamba/issues/2248 + if hasattr(args, "no_user") and args.no_user: for_user = False anaconda_prompt = on_win and args.anaconda_prompt