Skip to content

Commit 6501468

Browse files
committed
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.
1 parent 19ca6b5 commit 6501468

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/multi-platform-build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,14 @@ jobs:
115115
- name: Install rattler-build and anaconda-client
116116
if: steps.should_build.outputs.should_build == 'true'
117117
run: |
118-
mamba install -n build-env --override-channels -c conda-forge rattler-build anaconda-client -y
118+
if [[ "$RUNNER_OS" == "Windows" ]]; then
119+
cmd //D //S //C '%CONDA%\condabin\mamba.bat install -n build-env --override-channels -c conda-forge rattler-build anaconda-client -y'
120+
else
121+
mamba install -n build-env --override-channels -c conda-forge rattler-build anaconda-client -y
122+
fi
123+
echo "CONDA_NO_PLUGINS=true" >> "$GITHUB_ENV"
124+
echo "PYTHONUTF8=1" >> "$GITHUB_ENV"
125+
echo "PYTHONIOENCODING=utf-8" >> "$GITHUB_ENV"
119126
120127
- name: Show environment info
121128
if: steps.should_build.outputs.should_build == 'true'

.github/workflows/unilabos-conda-build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,14 @@ jobs:
108108
- name: Install rattler-build and anaconda-client
109109
if: steps.should_build.outputs.should_build == 'true'
110110
run: |
111-
mamba install -n build-env --override-channels -c conda-forge rattler-build anaconda-client -y
111+
if [[ "$RUNNER_OS" == "Windows" ]]; then
112+
cmd //D //S //C '%CONDA%\condabin\mamba.bat install -n build-env --override-channels -c conda-forge rattler-build anaconda-client -y'
113+
else
114+
mamba install -n build-env --override-channels -c conda-forge rattler-build anaconda-client -y
115+
fi
116+
echo "CONDA_NO_PLUGINS=true" >> "$GITHUB_ENV"
117+
echo "PYTHONUTF8=1" >> "$GITHUB_ENV"
118+
echo "PYTHONIOENCODING=utf-8" >> "$GITHUB_ENV"
112119
113120
- name: Show environment info
114121
if: steps.should_build.outputs.should_build == 'true'

0 commit comments

Comments
 (0)