Nothing I have tried has worked. The subshell idea only yielded the same results as the already implemented method. I tried writing and running a script outside of LAVA to download the file and run the command, in case it was the fact it was running inside a script that was the issue, but the command worked. I then imported that script into my GitHub set up and ran a job using that, but it then no longer worked. So I am quite confident the problem lies with LAVA, but what exactly it could be, I don't have a clue.
Just for reference, the subshell I wrote and used looked like this (keep in mind I completely removed the eval command when running this): rc=$(echo $($* ; echo $?))
Best regards, Michael