From eb1f547ee11693e7b3152b0d411dd7d3702728e7 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 20 Oct 2013 22:52:50 +0100 Subject: [PATCH] Have internal compile-dotfile return an error if dotfile is missing --- src/lib/internals/compile-dotfile.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib/internals/compile-dotfile.sh b/src/lib/internals/compile-dotfile.sh index 7cb1c6d..6ba06dc 100644 --- a/src/lib/internals/compile-dotfile.sh +++ b/src/lib/internals/compile-dotfile.sh @@ -2,6 +2,11 @@ compile-dotfile() { local dotfile="$1" if [ -z "$dotfile" ]; then dotfile="$DOTFILE"; fi + if [ ! -f "$dotfile" ]; then + echo "ERROR: \"$dotfile\" does not exist." >&2 + return 1 + fi + local output="" local line="" while IFS= read line; do