Strict Error Settings

・1 min read

I recently revisited an old project and tried to get it up and running. First thing I noticed is that I'm providing the user terrible error messages because even I couldn't tell what was going on. Second thing I noticed was that I didn't follow best practices for writing bash scripts. I was being too lenient with errors and steamrolling over real issues instead of stopping at the first sign of trouble. Lesson for anyone that reads this is to always have the following in any bash script

#!/bin/bash -eu
set -o pipefail
# Rest of the script

Trust me, it will save you a lot of headache down the line.

DISCUSSION (5)
Classic DEV Post from Aug 9 '18

What are some blockers for you on contributing to open source projects?

A discussion to understand some of the problems faced by the community on contributing to open source projects

Dispassionate problem solver. I enjoy building minimal and efficient systems. I like to think I don't drink the kool-aid