feat: detect and warn if running as root

This commit is contained in:
Andre Toerien
2025-09-26 14:49:12 +02:00
committed by Gideon
parent 7c7e7c3ce4
commit 47b51a8be0
7 changed files with 83 additions and 3 deletions

View File

@@ -6,6 +6,13 @@
[misc]
# On Unix systems, Topgrade should not be run as root, it
# will run commands with sudo or equivalent where needed.
# Set this to true to suppress the warning and confirmation
# prompt if Topgrade detects it is being run as root.
# (default: false)
# allow_root = false
# Run `sudo -v` to cache credentials at the start of the run
# This avoids a blocking password prompt in the middle of an unattended run
# (default: false)