Skip to content

Fixing #29 - now obtaining flags also without --#30

Merged
erikaheidi merged 1 commit intomainfrom
fix-flags
May 8, 2021
Merged

Fixing #29 - now obtaining flags also without --#30
erikaheidi merged 1 commit intomainfrom
fix-flags

Conversation

@erikaheidi
Copy link
Member

This fixes issue #29 where the hasFlag method didn't work as expected and as explained in the documentation.

In order to not break code that is already using --flagname within the hasFlag method, it now accounts for both ways, so if you call a command like this:

minicli hello test --myflag

Both $this->hasFlag('myflag') and $this->hasFlag('--myflag') now work.

@erikaheidi erikaheidi added the bug Something isn't working label May 8, 2021
@erikaheidi
Copy link
Member Author

Check this out @lotfio 🙏🏼

@lotfio
Copy link
Member

lotfio commented May 8, 2021

All good @erikaheidi 💪

image

@erikaheidi erikaheidi merged commit b359a74 into main May 8, 2021
@minicli minicli locked and limited conversation to collaborators May 8, 2021
@WendellAdriel WendellAdriel deleted the fix-flags branch December 15, 2025 14:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants