From a8df2214212233d8fd2b07b84755daa87c2fe0c1 Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Wed, 18 Sep 2019 12:07:05 -0400 Subject: [PATCH] BuildSourceImage: fail early if mkdir fails Signed-off-by: Vincent Batts --- BuildSourceImage.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/BuildSourceImage.sh b/BuildSourceImage.sh index 84b0248..4296dbd 100755 --- a/BuildSourceImage.sh +++ b/BuildSourceImage.sh @@ -976,6 +976,10 @@ main() { _rm_rf "${TMPDIR}" fi _mkdir_p "${TMPDIR}" + ret=$? + if [ ${ret} -ne 0 ] ; then + _error "failed to mkdir ${TMP}" + fi # setup rootfs to be inspected (if any) rootfs=""