From f77a9d1272a0fbca02a005259d3d852c71ca3138 Mon Sep 17 00:00:00 2001 From: mr-boneman Date: Sun, 12 May 2024 21:47:34 +0200 Subject: [PATCH] should work now --- action.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/action.yml b/action.yml index 8842599..d7f5d24 100644 --- a/action.yml +++ b/action.yml @@ -9,12 +9,17 @@ inputs: runs: using: "composite" steps: - - run: curl -o nim.tar.xz https://nim-lang.org/download/nim-${{ inputs.version }}-linux_x64.tar.xz - - run: tar -xf nim.tar.xz - - run: cd nim-${{ inputs.version }} && ./install.sh /usr/bin - shell: bash - - run: cp nim-${{ inputs.version }}/bin/* /usr/bin - shell: bash - - run: mkdir ./lib && mv /usr/lib/nim/* ./lib && mv ./lib /usr/lib/nim/lib # fixes nim not finding the system lib - shell: bash - - run: rm -fr nim.tar.gz nim-${{ inputs.version }} lib \ No newline at end of file + - shell: bash + run: | + set -euxo pipefail + tempdir = $(mktemp -d) + pushd $tempdir + curl -o nim.tar.xz https://nim-lang.org/download/nim-${{ inputs.version }}-linux_x64.tar.xz + tar -xf nim.tar.xz + pushd nim-${{ inputs.version }} + ./install.sh /usr/bin + popd + cp nim-${{ inputs.version }}/bin/* /usr/bin + mkdir ./lib && mv /usr/lib/nim/* ./lib && mv ./lib /usr/lib/nim/lib # fixes nim not finding the system lib + popdir + rm -fr $tempdir \ No newline at end of file