From 72a724a754fc53adc6068074d3fd2ffa268980d3 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Thu, 6 Apr 2017 10:55:31 -0400 Subject: make ASPCACHE dir creation fatal --- asp.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'asp.in') diff --git a/asp.in b/asp.in index 5bb9c90..2f18e58 100644 --- a/asp.in +++ b/asp.in @@ -128,9 +128,11 @@ initialize() { mkdir -p "$ASPROOT" fi - cd "$ASPROOT" || log_fatal "ASPROOT ($ASPROOT) does not exist!" + cd "$ASPROOT" || log_fatal "ASPROOT (%s) does not exist!" "$ASPROOT" - [[ -d $ASPCACHE ]] || mkdir -p "$ASPCACHE" + if [[ ! -d $ASPCACHE ]] && ! mkdir -p "$ASPCACHE"; then + log_fatal 'failed to create ASPCACHE (%s)' "$ASPCACHE" + fi [[ -f .asp ]] && return 0 -- cgit v1.2.3-70-g09d2