summaryrefslogtreecommitdiffstats
path: root/src/cmd/build.sh
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-01-17 10:34:56 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-01-17 10:34:56 (EST)
commita8e57bde8d2d9ba23a8c5fc7ddc6438c0142d33f (patch)
treef6a8a785ae52de10da5ea37e83339d3f96657659 /src/cmd/build.sh
parent69b9e4d24a0efa73405bbe42f7e06b567bb1f60e (diff)
cmd/*: Check return value of profile_detect()
Also clean up on error now.
Diffstat (limited to 'src/cmd/build.sh')
-rw-r--r--src/cmd/build.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/build.sh b/src/cmd/build.sh
index d48742e..5151c46 100644
--- a/src/cmd/build.sh
+++ b/src/cmd/build.sh
@@ -70,7 +70,10 @@ cmd_build_main()
cmd_build_pkg_dir="${arg}"
done
- profile_detect "${root}"
+ if ! profile_detect "${root}"; then
+ [ "x${dev}" != 'x' ] && block_umount "${root}"
+ return 2
+ fi
if ! [ -d "${cmd_build_pkg_dir}" ]; then
error "$(get_msg 'cmd_build_not_a_dir')" "${cmd_build_pkg_dir}"