From d5fd4c18501b79b73f7c249b4f562233a1e82440 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 18 Aug 2014 16:43:54 -0400 Subject: install: Error if chroot dir exists --- (limited to 'lib') diff --git a/lib/cmd/install.sh b/lib/cmd/install.sh index 4197fbc..277510e 100644 --- a/lib/cmd/install.sh +++ b/lib/cmd/install.sh @@ -66,8 +66,11 @@ cmd_install_main() "${arch}" "${plat}" fi + if [ -d "${chroot}" ]; then + error 2 "$(get_msg 'cmd_install_chroot_dir_exists')" "${chroot}" + fi if ! mkdir "${chroot}" || ! mkdir "${chroot}/.prokit"; then - : Error + error 2 "$(get_msg 'cmd_install_mkdir_chroot_fail')" "${chroot}" fi cmd_install_find_pkgs "${suite}" "${arch}" "${plat}" "${chroot}" -- cgit v0.9.1