From 271dd73a4e2b82de4cf08a996c7765fe07fa7b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Sat, 21 Nov 2020 11:14:04 +0000 Subject: [PATCH] Use environment files for adding to PATH on Github Action (#2016) --- .github/workflows/check.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index fe8bc1ef1..5b4cc84f2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -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: |