Open Mte90 opened 1 week ago
like as to add sudo
as built in?
Something like
sudo {
apt install etc
}
This could be added to command modifiers:
sudo silent unsafe $ my_cmd $?
// or
unsafe sudo {
$apt install cmd$
}
The things is... what to do when people don't have sudo
installed? This is not a built-in command and someone could have an alternative to that like doas
I think that Amber in that case will add on the first sudo
usage (whatever the implementation is), block the execution if sudo
is not available on top of the script
An idea could be that every command inside this block get prefix with
sudo
.Another can be like a check if the script is running as root or not, like a function
user_is_root
.