fix: check_root incompatible with set -e when running as root
Some checks failed
Build and Push Docker Images / docker (push) Failing after 8s

This commit is contained in:
jeanotx32
2026-05-18 22:58:53 -04:00
parent af7fc88ea6
commit 17e20b8ad6

View File

@@ -55,7 +55,11 @@ while [[ $# -gt 0 ]]; do
done
# ─── Vérifications communes ───────────────────────────────────────────────────
check_root() { [[ $EUID -ne 0 ]] && error "Ce script doit être exécuté en root (sudo)."; }
check_root() {
if [[ $EUID -ne 0 ]]; then
error "Ce script doit être exécuté en root (sudo)."
fi
}
check_deps() {
command -v python3 &>/dev/null || error "Python 3 est requis : apt install python3 python3-venv"
command -v docker &>/dev/null || error "Docker est requis. Consultez https://docs.docker.com/engine/install/"