Restore the line that set errno to ENOENT when find_path() fails.

This was inadvertently removed when the "goto bad" was added.
This commit is contained in:
Todd C. Miller
2023-01-19 10:08:38 -07:00
parent e3583e01b8
commit 1e0bb704c2

View File

@@ -149,6 +149,7 @@ resolve_editor(const char *ed, size_t edlen, int nfiles, char * const *files,
/* If we can't find the editor in the user's PATH, give up. */
if (find_path(editor, &editor_path, &user_editor_sb, getenv("PATH"), NULL,
0, allowlist) != FOUND) {
errno = ENOENT;
goto bad;
}