summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-07-30 22:08:05 +0200
committerDave Reisner <dreisner@archlinux.org>2011-09-27 12:18:04 +0200
commita0ea96ea0126814c518ffdc50449005b5b55d28e (patch)
tree1f2bbc9b217e3f2eaf11ab1554592489e70abcfd
parente0549901aec53f3a0dc9577e88c4077d7bd9f6a7 (diff)
downloadmkinitcpio-a0ea96ea0126814c518ffdc50449005b5b55d28e.tar.gz
mkinitcpio-a0ea96ea0126814c518ffdc50449005b5b55d28e.tar.xz
mkinitcpio: keep going even when a hook isn't found
Instead of bailing entirely, throw an error, and ensure that we exit with a non-zero status. The user might do something as simple as misspell a hook name which may or may not prevent a useful image from being created. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-xmkinitcpio3
1 files changed, 2 insertions, 1 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 0116722..72e7ec8 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -312,7 +312,8 @@ for hook in ${HOOKS}; do
fi
parse_hook
else
- die "Hook '$hook' can not be found."
+ error "Hook '$hook' can not be found."
+ (( ++builderrors ))
fi
done