Error behavior when bolt can't sudo without askpass in --run-as root
mode is confusing
#3265
Labels
Bug
Bug reports and fixes.
--run-as root
mode is confusing
#3265
Describe the Bug
If I run
bolt apply --target localhost --run-as root ...
and the shell in which I'm running it does not have the ability tosudo
without password,bolt
fails without explaining why.Expected Behavior
When
bolt apply
can't suid in--run-as root
mode, a failure indicating what went wrong should be printed to the terminal.Observed behavior:
If I grant the invoking terminal skip-askpass permission to
sudo
by running e.g.sudo echo
and then re-running the above command, things work.Steps to Reproduce
sudo echo
prompts for password. Do not enter a password.bolt apply --verbose --target localhost --run-as root --execute 'notice {"hello":}'
apply
fails without any indication of why.Environment
3.27.4
installed via brew cask.Additional Context
This should be an easy fix, since the error cause is visible in
--log-level debug
:The
NO_PASSWORD
log report should be surfaced more loudly in the apply failure output.The text was updated successfully, but these errors were encountered: