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: make: Fix parsing options with spaces #21

Closed
pawamoy opened this issue Mar 26, 2024 · 0 comments
Closed

fix: make: Fix parsing options with spaces #21

pawamoy opened this issue Mar 26, 2024 · 0 comments

Comments

@pawamoy
Copy link
Owner

pawamoy commented Mar 26, 2024

opts=("$(options "$@")") && opts=() || shift $?

We must wrap the output of options between quotes to maintain line jumps and correctly split items while loading the array. But then, if the output is empty (no options), a single empty string is loaded in the array. To prevent that, we reset the array if the return code was 0.

pawamoy added a commit that referenced this issue Mar 28, 2024
@pawamoy pawamoy closed this as completed Mar 28, 2024
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

No branches or pull requests

1 participant