Add `env_editor` and `editor` abstractions to `sudoers/policy.rs`
squell opened this issue · comments
Marc R. Schoolderman commented
I.e. ideally we should have a function like fn check_editor(path: &Path) -> PathBuf
or some such that takes an editor path representing a user preference (e.g. taken from the environment) and returns the editor that the policy has decided for the user.
Alternatively (and perhaps better), we could simply offer a fn editor() -> PathBuf
that checks the environment itself (and the env_editor
and editor
settings) and resolves the editor. CC PR #697
Christian Poveda Ruiz commented
Fixed by #702