summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-01-17 09:44:08 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-01-17 09:44:08 (EST)
commit1cc634639779b8cbb0dc6ce94f1663b3232c5673 (patch)
tree2b3ccfc794291a374905401ae887c72a7a899647
parentcd6859f9bd4767dcfb96bab57b55c2f6edef8d39 (diff)
cmd/build: Use non-exiting error() and clean up on error
-rw-r--r--src/cmd/build.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd/build.sh b/src/cmd/build.sh
index dbfd910..86d770c 100644
--- a/src/cmd/build.sh
+++ b/src/cmd/build.sh
@@ -73,8 +73,9 @@ cmd_build_main()
profile_detect "${root}"
if ! [ -d "${cmd_build_pkg_dir}" ]; then
- error 2 "$(get_msg 'cmd_build_not_a_dir')" \
- "${cmd_build_pkg_dir}"
+ error "$(get_msg 'cmd_build_not_a_dir')" "${cmd_build_pkg_dir}"
+ [ "x${dev}" != 'x' ] && block_umount "${root}"
+ return 2
fi
package_init "${cmd_build_pkg_dir}"
package_set_substvars "${arch}" "${plat}"