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

fix: remove %pistol-extra% arguments when not passed to pistol #68

Merged
merged 1 commit into from
Aug 27, 2021
Merged

fix: remove %pistol-extra% arguments when not passed to pistol #68

merged 1 commit into from
Aug 27, 2021

Conversation

lucas-mior
Copy link
Contributor

@lucas-mior lucas-mior commented Aug 22, 2021

Although it took long for me to notice it,
PR (#58) introduced a bug which would cause trouble when invoking pistol without extra arguments (and the config expected those).

Basically, it would pass, for example, %pistol-extra3%, literally, instead of the argument (because it wasn't there), instead of just removing it from the arguments array.
The solution, as can be read in the code, is to make the argument an empty string and then, when appending to the other arguments, check if it is empty before doing so.

Note that this is necessary if one is to put multiple %pistol-extra% as in #56 .

@doronbehar
Copy link
Owner

Sorry it took me a while to answer. This looks good. Thanks for maintaining this part of the code.

@doronbehar doronbehar merged commit 4c9a62c into doronbehar:master Aug 27, 2021
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