fix windows conda run encoding in workflows

Enable UTF-8 for later conda run commands so anaconda-client version output does not fail under the Windows code page.

fix conda plugin timing in windows workflows

Set CONDA_NO_PLUGINS only after mamba installs anaconda-client so setup-miniconda can initialize normally while later conda commands avoid the anaconda-auth plugin crash.

fix conda plugin crash in windows workflows

Disable conda plugins in build jobs so anaconda-auth from anaconda-client does not break conda info or conda run on Windows.

fix windows mamba bat quoting in workflows

Pass the mamba.bat command to cmd without nested escaped quotes so Git Bash does not produce an invalid program name.

fix windows mamba install in conda workflows

Use the Windows mamba.bat entrypoint from Git Bash so the setup-miniconda wrapper does not break after recent runner updates.
This commit is contained in:
Xuwznln
2026-05-25 01:05:46 +08:00
parent 19ca6b5db8
commit 6501468e71
2 changed files with 16 additions and 2 deletions

View File

@@ -115,7 +115,14 @@ jobs:
- name: Install rattler-build and anaconda-client
if: steps.should_build.outputs.should_build == 'true'
run: |
mamba install -n build-env --override-channels -c conda-forge rattler-build anaconda-client -y
if [[ "$RUNNER_OS" == "Windows" ]]; then
cmd //D //S //C '%CONDA%\condabin\mamba.bat install -n build-env --override-channels -c conda-forge rattler-build anaconda-client -y'
else
mamba install -n build-env --override-channels -c conda-forge rattler-build anaconda-client -y
fi
echo "CONDA_NO_PLUGINS=true" >> "$GITHUB_ENV"
echo "PYTHONUTF8=1" >> "$GITHUB_ENV"
echo "PYTHONIOENCODING=utf-8" >> "$GITHUB_ENV"
- name: Show environment info
if: steps.should_build.outputs.should_build == 'true'

View File

@@ -108,7 +108,14 @@ jobs:
- name: Install rattler-build and anaconda-client
if: steps.should_build.outputs.should_build == 'true'
run: |
mamba install -n build-env --override-channels -c conda-forge rattler-build anaconda-client -y
if [[ "$RUNNER_OS" == "Windows" ]]; then
cmd //D //S //C '%CONDA%\condabin\mamba.bat install -n build-env --override-channels -c conda-forge rattler-build anaconda-client -y'
else
mamba install -n build-env --override-channels -c conda-forge rattler-build anaconda-client -y
fi
echo "CONDA_NO_PLUGINS=true" >> "$GITHUB_ENV"
echo "PYTHONUTF8=1" >> "$GITHUB_ENV"
echo "PYTHONIOENCODING=utf-8" >> "$GITHUB_ENV"
- name: Show environment info
if: steps.should_build.outputs.should_build == 'true'