Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve registration of CLI flags #85

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rbackert
Copy link

@rbackert rbackert commented Jan 9, 2025

Using empty() to detect whether a CLI argument is optional disallows falsy default values. E.g. optional flags that default to false, as with this plugin's core --resume and --disable_intermediate_images flags.

This PR replaces empty() with isset(), aligning with the behavior in HMCI\Iterator\Base::parse_args().

As a bonus, convert both 'bool' and 'boolean' argument types to 'flag'.

- allow falsy default values for CLI arguments
- convert types 'bool' *and* 'boolean' to 'flag'
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.

1 participant