Skip to content

Commit 37890ae

Browse files
ci: safe conda channel removal; fix pre-commit and ruff issues
1 parent d8d5b31 commit 37890ae

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/main.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ jobs:
4646
auto-update-conda: true
4747
conda-solver: libmamba
4848

49+
- name: Ensure conda 'defaults' channel not present
50+
run: |
51+
# Only remove the 'defaults' channel if it exists to avoid CondaKeyError
52+
if conda config --show channels | grep -q 'defaults'; then
53+
conda config --remove channels defaults
54+
echo "Removed 'defaults' channel"
55+
else
56+
echo "'defaults' channel not present, skipping removal"
57+
fi
58+
4959
- name: Install dependencies
5060
run: |
5161
poetry check
@@ -69,4 +79,4 @@ jobs:
6979
if: ${{ github.event_name == 'push' }}
7080
with:
7181
github_token: ${{ secrets.GITHUB_TOKEN }}
72-
publish_dir: ./build
82+
publish_dir: ./build

0 commit comments

Comments
 (0)