Note

This post is a thought. It's a short note that I make about someone else's content online. Learn more about the process thoughts

Here's my thought on πŸ’­ Safer Bash Shebang Recipes - Just Programmer's Manual


When using justfiles each line is ran separately from the last, unless you specify the file to be ran by something other than just such as bash. If you want variables to persist you need to set a shebang.

Also if you are using your script i a way that you want it to exit when it fails you need to set -e and -o pipefail. This is critical if you are thinking about using just for production scripts like ci/cd. I've hit too bugs where ci passes, but no artifacts were created issues for this exact reason.


foo:
  #!/usr/bin/env bash
  set -euxo pipefail
  hello='Yo'
  echo "$hello from Bash!"

This post was a thought by Waylon Walker see all my thoughts at https://waylonwalker.com/thoughts