nixos-rebuild-ng: only show the error message if the user forget to use --ask-sudo-password flag

This commit is contained in:
Thiago Kenji Okada 2024-12-08 21:15:23 +00:00
parent 69d9c3529d
commit b928ad0093

View File

@ -144,7 +144,7 @@ def run_wrapper(
return r
except subprocess.CalledProcessError:
if sudo and remote:
if sudo and remote and remote.sudo_password is None:
logger.error(
"while running command with remote sudo, did you forget to use "
+ "--ask-sudo-password?"