[IMP] add external command verification at startup
Add check_required_commands() function to verify that all required external tools are available before the script begins execution: - docker: Container runtime - compose: Docker compose wrapper (0k-scripts) - sudo: Required for filestore operations Benefits: - Fails fast with a clear error message listing missing commands - Prevents cryptic 'command not found' errors mid-execution - Documents script dependencies explicitly - Called immediately after argument validation in upgrade.sh
This commit is contained in:
@@ -29,6 +29,8 @@ if [[ $# -lt 4 ]]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
check_required_commands
|
||||
|
||||
readonly ORIGIN_VERSION="$1"
|
||||
readonly FINAL_VERSION="$2"
|
||||
readonly ORIGIN_DB_NAME="$3"
|
||||
|
||||
Reference in New Issue
Block a user