Skip to content

Commit

Permalink
add .exe on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Oct 4, 2024
1 parent 051bf38 commit 6dc458d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/example-14.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,19 @@ jobs:
python-version: "3.12"
- shell: bash -el {0}
run: |
cat <<EOF > script.py
cat <<EOF | python
import json
from subprocess import check_output
out = check_output(["conda", "config", "--show", "channels", "--json"])
out = check_output(
[
"conda${{ runner.os == 'Windows' && '.exe' || ''}}",
"config",
"--show",
"channels",
"--json",
]
)
channels = json.loads(out)["channels"]
input_channels = "${{ matrix.channels }}".split(",")
remove_defaults = "${{ matrix.conda-remove-defaults }}" == "true"
Expand All @@ -70,4 +78,3 @@ jobs:
elif "nodefaults" in input_channels or remove_defaults:
assert "defaults" not in channels
EOF
python script.py

0 comments on commit 6dc458d

Please sign in to comment.