julia-runtest icon indicating copy to clipboard operation
julia-runtest copied to clipboard

prefix doesn't support args

Open colinxs opened this issue 3 years ago • 2 comments

First off, thanks for adding the prefix: option. It definitely simplified things for projects with graphical dependencies. Unfortunately it doesn't allow for prefixes with arguments. For example, I tried using nix to install non-Julia dependencies by specifying:

      - uses: julia-actions/julia-runtest@v1
        with:
          prefix: nix-shell --run

In the shell this would done like "nix-shell --run 'julia -e 'using Pkg; Pkg.test()'". Unfortunately, julia-runtest treats nix-shell --run as the command, resulting in the following error:

/home/runner/work/_temp/dd15467b-7a13-4a49-89b9-3405b61d48af.sh: line 9: nix-shell --run: command not found

I think this would be fixed by changing:

        [[ -n $prefix ]] && julia_cmd=( "$prefix" "${julia_cmd[@]}" )

to

        [[ -n $prefix ]] && julia_cmd=( ${prefix[@]} "${julia_cmd[@]}" )

colinxs avatar Apr 10 '21 00:04 colinxs

@SaschaMann Any idea how we can fix this?

DilumAluthge avatar Apr 11 '21 20:04 DilumAluthge

I think the suggested fix works, but I need to ask someone who knows bash better than me to confirm :D sorry for the delay

SaschaMann avatar Apr 12 '21 16:04 SaschaMann