find_editor: remove the env_error argument
There is no case where we should fail to find an editor just because the values of EDITOR, VISUAL and SUDO_EDITOR are unavailable. Both sudoedit and the "env_editor" sudoers setting are documented as falling back on the hard-coded list of editors in the "editors" sudoers setting. Bug #1000
This commit is contained in:
@@ -105,7 +105,7 @@ main(int argc, char *argv[])
|
||||
|
||||
putenv(data->editor_var);
|
||||
editor_path = find_editor(data->nfiles, data->files, &edit_argc,
|
||||
&edit_argv, NULL, &env_editor, false);
|
||||
&edit_argv, NULL, &env_editor);
|
||||
ntests++;
|
||||
if (strcmp(editor_path, data->editor_path) != 0) {
|
||||
sudo_warnx("test %d: editor_path: expected \"%s\", got \"%s\"",
|
||||
|
Reference in New Issue
Block a user