What could cause `experimental_shell_command` to r...
# general
n
What could cause
experimental_shell_command
to report a
/usr/bin/bash: my_script.sh: command not found
error regarding the
command="./my_script.sh"
script field? When I change it to something like
ls -la ./ && echo $(pwd)
I see the expected
.sh
file bundled from the
shell_sources
dependency. I also see it and can run it directly from the preserved workspace. The error just doesn't make sense and I've trippled-checked the spelling. Using 2.13.0.dev5.
Seems a temporary fix is
command="ls my_script.sh | xargs bash"
e
What is your script's shebang and what is your `experimental_shell_command`'s `tools`list?
n
#!/bin/ksh
- that would explain it.
@enough-analyst-54434 May have spoken too soon. I seem to keep getting the same error if I include
ksh
in the tools list. If I run the script directly as bash -c "my_script.sh" I don't have an issue (I believe this is the invocation by Pants, but I can't tell exactly from just looking at the rule method). It doesn't seem to matter what the shebang is -- same behavior if I remove it, change it to
#!/bin/bash
, etc. The script is in the expected location in the preserved sandbox and the xargs invocation continues to work.
e
If I run the script directly as bash -c "my_script.sh" I don't have an issue (I believe this is the invocation by Pants, but I can't tell exactly from just looking at the rule method).
Instead of reading rule code, you can just read
__run.sh
in the preserved sandbox. Is there any way you can provide the preserved sandbox `__run.sh`script and ditto for whatever it points to - presumably
src/my_script.sh
or similar?