Skip to content

Commit 619b2e8

Browse files
author
Bence Szikszai
committed
Convert to bash.
1 parent 51cc8f7 commit 619b2e8

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

setup-poetry/action.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,21 @@ runs:
2626
shell: bash
2727
- name: Set paths
2828
run: |
29-
$poetryRoot = Join-Path $env:RUNNER_TEMP "poetry"
30-
$poetryHome = Join-Path $poetryRoot "home"
31-
$poetryBin = Join-Path $poetryRoot "bin"
32-
$binaryFolderName = if ($IsWindows) { "Scripts" } else { "bin" }
29+
poetry_root="$RUNNER_TEMP/poetry"
30+
poetry_home="$poetry_root/home"
31+
poetry_bin="$poetry_root/bin"
32+
if [[ "$RUNNER_OS" == "Windows" ]]; then
33+
binary_folder_name="Scripts"
34+
else
35+
binary_folder_name="bin"
36+
fi
3337
34-
Add-Content $env:GITHUB_ENV "POETRY_BIN_DIR=$poetryBin"
35-
Add-Content $env:GITHUB_ENV "POETRY_CONFIG_DIR=$(Join-Path $poetryRoot "config")"
36-
Add-Content $env:GITHUB_ENV "POETRY_HOME=$poetryHome"
37-
Add-Content $env:GITHUB_ENV "POETRY_HOME_BIN=$(Join-Path $poetryHome $binaryFolderName)"
38-
Add-Content $env:GITHUB_PATH $poetryBin
39-
shell: pwsh
38+
echo "POETRY_BIN_DIR=$poetry_bin" >> "$GITHUB_ENV"
39+
echo "POETRY_CONFIG_DIR=$poetry_root/config" >> "$GITHUB_ENV"
40+
echo "POETRY_HOME=$poetry_home" >> "$GITHUB_ENV"
41+
echo "POETRY_HOME_BIN=$poetry_home/$binary_folder_name" >> "$GITHUB_ENV"
42+
echo "$poetry_bin" >> "$GITHUB_PATH"
43+
shell: bash
4044
- name: Copy paths from $GITHUB_ENV to $GITHUB_OUTPUT
4145
id: copy-paths
4246
run: |

0 commit comments

Comments
 (0)