Skip to content

Commit a9afc01

Browse files
committed
[fix] : Added checking variable
1 parent 3f806ca commit a9afc01

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,9 @@ _mount() { if ! mountpoint -q "${2}" && [[ -f "${1}" ]] && [[ -d "${2}" ]]; then
197197
# Unmount chroot dir
198198
umount_chroot () {
199199
local _mount
200+
if [[ ! -v build_dir ]] || [[ "${build_dir}" = "" ]]; then
201+
msg_error "Exception error about working directory" 1
202+
fi
200203
for _mount in $(cat /proc/mounts | getclm 2 | grep "$(realpath ${build_dir})" | tac | grep -xv "$(realpath ${build_dir})/${arch}/airootfs"); do
201204
msg_info "Unmounting ${_mount}"
202205
_umount "${_mount}" 2> /dev/null

0 commit comments

Comments
 (0)