Duncaen / OpenDoas

A portable fork of the OpenBSD `doas` command
Other
610 stars 35 forks source link

Doas does not handle variables well #55

Closed Managor closed 3 years ago

Managor commented 3 years ago

When trying to use for example visudo with nano and doing it with sudo, sudo handles it just fine when written as sudo EDITOR=nano visudo. doas on the other hand complains doas: EDITOR=nano: command not found when attempting to run doas EDITOR=nano visudo

Duncaen commented 3 years ago

That is just not supported, doas will execute the command as a command. If you want to use variables, like in a shell, use the shell or allow the rule to pass through variables.

doas sh -c 'EDITOR=nano visudo'