From 24ec8bd92aab08f45364223b5837d53434b0978d Mon Sep 17 00:00:00 2001 From: Boegie19 <34578426+Boegie19@users.noreply.github.com> Date: Mon, 22 Aug 2022 23:01:06 +0200 Subject: [PATCH] Set environment variables correctly for `powershell` (#1) Fixes problems with `powershell` not recognizing the environment variables set from `bash`. --- action.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 37be449..9c58166 100644 --- a/action.yml +++ b/action.yml @@ -44,7 +44,16 @@ runs: run: | unzip aftman*.zip ./aftman self-install - echo "$HOME/.aftman/bin" >> $GITHUB_PATH + shell: bash + + - name: Set environment variable + if: runner.os == 'Windows' + run: echo "$HOME/.aftman/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + shell: powershell + + - name: Set environment variable + if: runner.os != 'Windows' + run: echo "$HOME/.aftman/bin" >> $GITHUB_PATH shell: bash - name: Install tools