Skip to content

Commit

Permalink
Use environment files for adding to PATH on Github Action (#2016)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat authored Nov 21, 2020
1 parent 87877f8 commit 271dd73
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ jobs:
- name: Setup brew python for test ${{ matrix.py }}
if: startsWith(matrix.py,'brew@py')
run: |
import subprocess
import subprocess; import codecs; import os
subprocess.check_call(["bash", "-c", f"brew upgrade python@3 || brew install python@3"])
print(f"::add-path::/usr/local/opt/python@3")
with codecs.open(os.environ["GITHUB_PATH"], "a", "utf-8") as file_handler:
file_handler.write("/usr/local/opt/python@3")
shell: python
- name: Pick environment to run
run: |
Expand Down

0 comments on commit 271dd73

Please sign in to comment.