Skip to content

parse_args.c never says "the -E option is not valid in edit mode"#498

Merged
millert merged 1 commit intosudo-project:mainfrom
SiliconA-Z:tags
Dec 18, 2025
Merged

parse_args.c never says "the -E option is not valid in edit mode"#498
millert merged 1 commit intosudo-project:mainfrom
SiliconA-Z:tags

Conversation

@SiliconA-Z
Copy link
Copy Markdown
Contributor

This is because we are checking the wrong variable.

Copy link
Copy Markdown
Collaborator

@millert millert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your fix is correct but this check will never succeed because of the

if ((flags & valid_flags) != flags)
        usage();

above it. Can you move the valid flag test to be after the MODE_EDIT checks? That way the user will get a better error message.

@SiliconA-Z
Copy link
Copy Markdown
Contributor Author

above it. Can you move the valid flag test to be after the MODE_EDIT checks? That way the user will get a better error message.

Done

This is because we are checking the wrong variable.
@millert millert merged commit 13eb424 into sudo-project:main Dec 18, 2025
5 checks passed
@SiliconA-Z SiliconA-Z deleted the tags branch December 18, 2025 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants