Repository navigation
Add MAPBOX_CLI_EXTRA_QUERY for query params the spec has no flag for - #34
Merged
Merged
Conversation
Some API parameters aren't exposed as CLI flags. This env var appends raw query parameters (k1=v1&k2=v2) to every request, giving an escape hatch without adding a flag per undeclared parameter.
zmofei
marked this pull request as ready for review
September 22, 2026 08:33
mattpodwysocki
approved these changes
Sep 22, 2026
mattpodwysocki
left a comment
Contributor
There was a problem hiding this comment.
Reviewed the diff (CHANGELOG.md, README.md, src/executor.rs). extra_query_from_env is sound: unset/empty is a clean no-op, the URL-based parsing handles the query-string edge cases well, and the &-inside-a-value limitation is clearly documented in both the doc comment and the test. Keeping it out of --help matches the existing convention for MAPBOX_DEBUG/MAPBOX_TIMEOUT. Test coverage is thorough, including the single-test-not-two reasoning for the env-var mutation. No issues found.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MAPBOX_CLI_EXTRA_QUERYappends raw query parameters to every request (samek1=v1&k2=v2shape as a URL query string), for API parameters this CLI's specs don't declare a flag for.--debug/--dry-runshow it alongside the rest of the request.Test plan
cargo build --releasescripts/live-smoke.sh 20(fonts scenario, now usingMAPBOX_CLI_EXTRA_QUERY=fresh=trueinstead of--fresh) against the live API — 14 ok, 0 failed