You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update the CLI client so that it could be used like cli_client.run(('my', 'cli', 'command'), maybe_sudo=True).
If maybe_sudo is passed, then the sudo = ...; cmd = sudo + cmd idiom could be performed within the CLI client. This idiom won't work in all cases. Sometimes, sudo shouldn't be the first word in a command. For these cases, a user should still be able to use is_root, so we should make the maybe_sudo argument default to false and leave the is_root function in place.
The text was updated successfully, but these errors were encountered:
If one wants to run a command as root, the current idiom for doing so is this:
It'd be far more convenient if the CLI client could encapsulate this idiom. One possible route would be to:
cli_client.run(('my', 'cli', 'command'), maybe_sudo=True)
.If
maybe_sudo
is passed, then thesudo = ...; cmd = sudo + cmd
idiom could be performed within the CLI client. This idiom won't work in all cases. Sometimes, sudo shouldn't be the first word in a command. For these cases, a user should still be able to useis_root
, so we should make themaybe_sudo
argument default to false and leave theis_root
function in place.The text was updated successfully, but these errors were encountered: