From 75e4d680928ee70325c9891271437bca30debe70 Mon Sep 17 00:00:00 2001 From: "Alejandro R. Mosteo" Date: Mon, 12 Aug 2024 16:47:56 +0200 Subject: [PATCH] Simplify addition to path step --- action.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/action.yml b/action.yml index 553fabc1..208fe254 100644 --- a/action.yml +++ b/action.yml @@ -131,18 +131,13 @@ runs: echo REMOVAL TARGET: $(which alr) rm -f $(which alr)* && echo REMOVED stable alr used for toolchain install - - name: Install GNAT (III) - Add to path (Windows) - if: steps.need-GNAT.outputs.need == 'true' && runner.os == 'Windows' - shell: pwsh - run: | - $Target = Resolve-Path .\setup_alire_prefix\bin - Add-Content $env:GITHUB_PATH $Target - - - name: Install GNAT (III) - Add to path (!Windows) - if: steps.need-GNAT.outputs.need == 'true' && runner.os != 'Windows' + - name: Install GNAT (III) - Add to path + if: steps.need-GNAT.outputs.need == 'true' shell: bash run: | - readlink -f "$PWD/setup_alire_prefix/bin" >> $GITHUB_PATH + path_to_add=$(pwd -W 2>/dev/null || pwd)/setup_alire_prefix/bin + echo Adding to PATH: $path_to_add + echo "$path_to_add" >> $GITHUB_PATH # END TOOLCHAIN INSTALLATION