f" was killed by {signal.Signals(-returncode).name} signal."
)
elif returncode == 127:
- logging.error(f"{cmdline[0]} not found.")
+ # Anything invoked beneath /work is a script that we mount into place (so we know it exists). If one
+ # of these scripts fails with exit code 127, it's either because the script interpreter was not
+ # installed or because one of the commands in the script failed with exit code 127.
+ if cmdline[0].startswith("/work"):
+ logging.error(f"{cmdline[0]} failed with non-zero exit code 127")
+ logging.info(
+ "(Maybe a program was not found or the script interpreter (e.g. bash) is not installed?)"
+ )
+ else:
+ logging.error(f"{cmdline[0]} not found.")
else:
logging.error(
f'"{shlex.join([*sandbox, *cmdline] if ARG_DEBUG.get() else cmdline)}"'