From bb2f06a314aab00020fd0cc1f7724fac92fc2d55 Mon Sep 17 00:00:00 2001 From: Space V <40030799+ahcenezdh@users.noreply.github.com> Date: Thu, 7 Mar 2024 19:41:43 +0100 Subject: [PATCH] Update native_check.sh --- .ci/native_check.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.ci/native_check.sh b/.ci/native_check.sh index 8f67a61ed..420a33dbf 100644 --- a/.ci/native_check.sh +++ b/.ci/native_check.sh @@ -27,14 +27,14 @@ while IFS= read -r md_file; do ns=$(grep -Po '^---\nns: \K.*' "$md_file" | head -n 1) if [[ -z "$ns" ]]; then - echo "Error: 'ns' missing in $md_file" - continue + printf "Error: 'ns' missing in $md_file" + exit 1 fi # Check if 'ns' exists as a project directory if [[ ! " ${valid_ns_dirs[*]} " =~ " ${ns} " ]]; then - echo "Error: The namespace '${ns}' specified in ${md_file} does not exist as a directory in the project." - continue + printf "Error: The namespace '${ns}' specified in ${md_file} does not exist as a directory in the project." + exit 1 fi # Determine the directory name of the current file @@ -42,8 +42,8 @@ while IFS= read -r md_file; do # Check if file is in the correct directory according to its 'ns' value if [[ "$ns" != "$folderName" ]]; then - echo "Error: The file \`${md_file}\` is located in the '${folderName}' directory but should be in '${ns}'." - continue + printf "Error: The file \`${md_file}\` is located in the '${folderName}' directory but should be in '${ns}'." + exit 1 fi echo "$md_file successfully verified."