Skip to content
New issue

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

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

Already on GitHub? # to your account

[qa] Allow multiple --extra-fontbakery-args #812

Merged
merged 1 commit into from
Jan 18, 2024
Merged

Conversation

simoncozens
Copy link
Contributor

--extra-fontbakery-args is a flag on gftools-qa which passes another flag to fontbakery. Of course this causes problems. If you say --extra-fontbakery-args --foo this gets interpreted as a --foo flag to gftools-qa. "--foo" doesn't help because the shell eats the quotes. Apparently the right way to do it is --extra-fontbakery-args="--foo" which parses properly. But then --extra-fontbakery-args="--foo bar" works on the gftools-qa side, but adds a single string "--foo bar" string to fontbakery's argv, which does not parse on that side. Much joy. And you really don't want to get into splitting arguments on spaces and feeding them to argv, because --html "A Report.html" should be two arguments, not three. And --extra-fontbakery-args="--foo" "bar" doesn't work either.

So (deep breath) it turns out the right way to do it is --extra-fontbakery-args="--foo" --extra-fontbakery-args="bar", and that in turn means we need to use action="append" instead of nargs="*".

@m4rc1e m4rc1e merged commit db8582e into main Jan 18, 2024
11 checks passed
@m4rc1e
Copy link
Collaborator

m4rc1e commented Jan 18, 2024

Thank you!

@simoncozens simoncozens deleted the fix-extra-fb-args branch May 30, 2024 07:46
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants