News for hackers. Stuff that matters.
Re:Using GPG to Encrypt Your Data by nothrabannosir on Thursday January 12, 2017 @01:18PM (#13384656)
I disagree. set -eu should be at the top of every bash script.

This is the classic braceless if-guard mistake; leave it out today because you don't need it, forget, add something tomorrow and it breaks.

Re:Using GPG to Encrypt Your Data by switch007 on Thursday January 12, 2017 @02:38PM (#13385368)
You can over-rely on "set -e" however:

  #!/usr/bin/env bash
  set -e
  fail() { false ; echo hello; }
  if ! fail; then :; fi
That outputs "hello" and exits with 0.