From 53231ce9783d72f0d79c85583b434a5a6ad6fe0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Thu, 20 Jun 2024 20:31:23 +0100 Subject: [PATCH 1/2] Support prefixes with args Same as https://github.com/julia-actions/julia-runtest/pull/71. --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index b579764..9d1503c 100644 --- a/action.yml +++ b/action.yml @@ -30,8 +30,8 @@ runs: julia_cmd=( julia --color=yes --code-coverage --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()' ) # Add the prefix in front of the command if there is one - prefix="${{ inputs.prefix }}" - [[ -n $prefix ]] && julia_cmd=( "$prefix" "${julia_cmd[@]}" ) + prefix=( ${{ inputs.prefix }} ) + [[ -n ${prefix[*]} ]] && julia_cmd=( "${prefix[@]}" "${julia_cmd[@]}" ) # Run the Julia command "${julia_cmd[@]}" From 7c29d7eb3c285957e80900dd7b37f25564255d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mos=C3=A8=20Giordano?= Date: Thu, 27 Jun 2024 21:36:47 +0100 Subject: [PATCH 2/2] Update action.yml Co-authored-by: Curtis Vogt --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 9d1503c..1750a97 100644 --- a/action.yml +++ b/action.yml @@ -31,7 +31,7 @@ runs: # Add the prefix in front of the command if there is one prefix=( ${{ inputs.prefix }} ) - [[ -n ${prefix[*]} ]] && julia_cmd=( "${prefix[@]}" "${julia_cmd[@]}" ) + [[ ${#prefix[@]} -gt 0 ]] && julia_cmd=( "${prefix[@]}" "${julia_cmd[@]}" ) # Run the Julia command "${julia_cmd[@]}"