Skip to content

Commit 271dd73

Browse files
authored
Use environment files for adding to PATH on Github Action (#2016)
1 parent 87877f8 commit 271dd73

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/check.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,10 @@ jobs:
6464
- name: Setup brew python for test ${{ matrix.py }}
6565
if: startsWith(matrix.py,'brew@py')
6666
run: |
67-
import subprocess
67+
import subprocess; import codecs; import os
6868
subprocess.check_call(["bash", "-c", f"brew upgrade python@3 || brew install python@3"])
69-
print(f"::add-path::/usr/local/opt/python@3")
69+
with codecs.open(os.environ["GITHUB_PATH"], "a", "utf-8") as file_handler:
70+
file_handler.write("/usr/local/opt/python@3")
7071
shell: python
7172
- name: Pick environment to run
7273
run: |

0 commit comments

Comments
 (0)