From 42e1308d262cc7579f190b6761ad98ea133626fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20Moreira?= Date: Thu, 5 Sep 2024 22:23:58 +0100 Subject: [PATCH] chore: the script should exit in case it doesn't find the correct file --- misc/fs.func | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/misc/fs.func b/misc/fs.func index 3035d3bf..cfcd1d9d 100644 --- a/misc/fs.func +++ b/misc/fs.func @@ -12,13 +12,13 @@ fs_cat() { if [ "$FS_SOURCE" == "local" ]; then FILE_PATH="${FS_LOCAL_ROOT}/$1"; if [ -f "$FILE_PATH" ]; then - cat "$FILE_PATH"; + cat "$FILE_PATH" && exit; fi; elif [ "$FS_SOURCE" == "remote" ]; then - curl -s "https://raw.githubusercontent.com/tteck/Proxmox/${FS_REMOTE_BRANCH}/$1"; + curl -s "https://raw.githubusercontent.com/tteck/Proxmox/${FS_REMOTE_BRANCH}/$1" && exit; fi; - msg_error "Something went wrong while attempting to cat file: $1."; + echo "Something went wrong while attempting to cat file: $1."; echo -e "\nExiting..."; sleep 2; exit;