Bash: command not found

I am trying to run a bash script from within a before_install hook, and Travis is telling me that bash is not installed. This is quite surprising, can you please advise how we should proceed?

error in action:
travis configuration:

It’s not bash that’s not found, but rather, " bash" with extra spaces in front.




Hey @BanzaiMan, thanks for the quick response! This gets me further, nice catch on the spaces there. Related question: I have an after_failure hook set up to print log files, but it doesn’t seem to run if something fails in the before* hooks, is it possible to execute a hook after a failure during the setup phase?

In this particular case I think my issue is that a few of the commands in the setup are not being run (lines 21-22 in the config linked above). I had to wrap the lines in quotes in order to accommodate the complex regular expressions on the line, but they never show up in the logs as being run - it looks like travis just skips them.

If you need to do this, you’ll have to devise your own failing_command || dump_log logic.

I see them here
and I don’t think these commands produce any output in the best of times. You can add something to force it; e.g., -print for find to print the matching file, or tell sed to echo the lines as well as editing files in place. They didn’t cause the job to error, so they exited with status 0.