Refacto env vars configuration management.#4935
Merged
Conversation
0c128ee to
9ea2b0b
Compare
There was a problem hiding this comment.
Pull request overview
Refactors how CLI options are derived from environment variables (and aligns related CLI parsing) by extracting per-option parsing helpers and splitting color/no-color env var handling into explicit RunContext accessors.
Changes:
- Reworked
parse_env_varsinto composable helper functions and rebuiltCliOptionsfrom parsed values. - Split color handling into
color_env_var()andno_color_env_var()with updated unit tests. - Simplified CLI arg parsing for follow-location and verbosity precedence.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
packages/hurl/src/cli/options/env_vars.rs |
Refactors env-var parsing into helper functions and reconstructs CliOptions from computed values. |
packages/hurl/src/cli/options/context.rs |
Introduces color_env_var / no_color_env_var, updates logic and tests accordingly. |
packages/hurl/src/cli/options/args.rs |
Simplifies follow-location flags handling and consolidates verbosity precedence logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9ea2b0b to
f543f8d
Compare
Collaborator
Author
|
/accept |
Collaborator
|
🕗 /accept is running, please wait for completion. |
Collaborator
|
✅ Pull request merged with fast forward by
|
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.
No description provided.