summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2017-04-06 10:55:31 -0400
committerDave Reisner <dreisner@archlinux.org>2017-04-06 10:55:31 -0400
commit72a724a754fc53adc6068074d3fd2ffa268980d3 (patch)
tree78aa0f97bb2bd6be21f1d471d8c2874729da8ccd
parent4a39f5474ccd54e48de8d55a30970e8a3d599b65 (diff)
downloadasp32-72a724a754fc53adc6068074d3fd2ffa268980d3.tar.xz
make ASPCACHE dir creation fatal
-rw-r--r--asp.in6
1 files changed, 4 insertions, 2 deletions
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