Comment

Comment by cjvirtucio

you could also just write as if you're writing go:

function main {

  if ! failing_cmd; then
    log "this fails!"
    return 1
  fi

  log "this won't log"
}

main

I only mention this because there are folks who don't like set -e.

parent cjvirtucio 3 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton