mirror of
https://github.com/tteck/Proxmox.git
synced 2025-02-15 06:09:15 +01:00
chore: the script should exit in case it doesn't find the correct file
This commit is contained in:
parent
eff35b2850
commit
42e1308d26
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue