Skip to content

Commit 0c95c65

Browse files
committed
parse_args.c never says "the -E option is not valid in edit mode"
This is because we are checking the wrong variable.
1 parent 9c040c7 commit 0c95c65

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/parse_args.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ parse_args(int argc, char **argv, const char *shell, int *old_optind,
563563
usage();
564564
if (mode == MODE_EDIT &&
565565
(ISSET(flags, MODE_PRESERVE_ENV) || extra_env.env_len != 0)) {
566-
if (ISSET(mode, MODE_PRESERVE_ENV))
566+
if (ISSET(flags, MODE_PRESERVE_ENV))
567567
sudo_warnx("%s", U_("the -E option is not valid in edit mode"));
568568
if (extra_env.env_len != 0)
569569
sudo_warnx("%s",

0 commit comments

Comments
 (0)