Refactor install.sh to streamline utilities sourcing

- Moved the sourcing of the utilities file to the beginning of the script for better organization and clarity.
- Removed redundant sourcing of the utilities file from the middle of the script.
This commit is contained in:
Yury Kossakovsky
2025-05-15 19:46:01 -06:00
parent 1da5d2851c
commit 0098378fd7

View File

@@ -2,6 +2,9 @@
set -e
# Source the utilities file
source "$(dirname "$0")/utils.sh"
# Check for nested n8n-installer directory
current_path=$(pwd)
if [[ "$current_path" == *"/n8n-installer/n8n-installer" ]]; then
@@ -25,9 +28,6 @@ if [[ "$current_path" == *"/n8n-installer/n8n-installer" ]]; then
fi
fi
# Source the utilities file
source "$(dirname "$0")/utils.sh"
# Get the directory where this script is located (which is the scripts directory)
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"