From c33b8fc1f89722127f9cba25cfa1b5b18ce69253 Mon Sep 17 00:00:00 2001 From: Erik Dannenberg Date: Sun, 25 Aug 2019 14:15:36 +0200 Subject: [PATCH] Improve error handling when non-existing namespace is passed to new cmd --- cmd/new.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/new.sh b/cmd/new.sh index 685de009..c6517b42 100644 --- a/cmd/new.sh +++ b/cmd/new.sh @@ -369,6 +369,7 @@ function main() { if [[ "${_arg_template_type}" == 'image' || "${_arg_template_type}" == 'builder' ]]; then get_ns_include_path "${target_namespace}" + [ $? -eq 3 ] && die "No namespace with id \"${target_namespace}\"" # shellcheck disable=SC2154 source_namespace_conf "${__get_ns_include_path}" add_template_filter_var '_tmpl_image_name' "${target_image_name}"