From 6389c8b30ff3cf7f1828ee325b60e25986a86af8 Mon Sep 17 00:00:00 2001 From: aminnairi <18418459+aminnairi@users.noreply.github.com> Date: Thu, 4 Jan 2024 12:27:58 +0100 Subject: [PATCH] fixed condition checking for the existence of the playbook not in the correct block of code --- main.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/main.sh b/main.sh index a4afdf5..dc9ef27 100755 --- a/main.sh +++ b/main.sh @@ -53,12 +53,12 @@ then read -r -p "Choice: " index choosen_playbook_path=${available_playbook_paths[$index - 1]} -fi -if [[ -z $choosen_playbook_path ]] -then - echo "Error: invalid index." - exit $ERROR_BECAUSE_PLAYBOOK_INVALID_OR_NOT_FOUND + if [[ -z $choosen_playbook_path ]] + then + echo "Error: invalid index." + exit $ERROR_BECAUSE_PLAYBOOK_INVALID_OR_NOT_FOUND + fi fi if [[ ! -f $choosen_playbook_path ]]