-
Notifications
You must be signed in to change notification settings - Fork 16
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
FE-6181 validate profile when no config is found #481
Merged
Merged
Conversation
This file contains 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
ptpaterson
changed the title
Fe 6181 validate profile
FE-6181 validate profile when no config is found
Dec 5, 2024
ecooper
approved these changes
Dec 5, 2024
jrodewig
reviewed
Dec 5, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nits. I would like to include the default in the help text tho. Thanks!
echo-bravo-yahoo
force-pushed
the
fe-6181-validate-profile
branch
from
December 5, 2024 21:17
bab230e
to
191c1e8
Compare
Co-authored-by: James Rodewig <[email protected]>
jrodewig
approved these changes
Dec 5, 2024
Closed
Merged
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.
Ticket(s): FE-6181
Problem
You can provide a profile when there is no config file and it will behave the same as
--profile default
. We should error instead.Solution
Remove the default value for
profile
option set incli.mjs
. The default of"default"
is already set if there is a config file.In the case where a path to a config file cannot be found, check if the
profile
option was specified by the caller and throw a validation error if so.other stuff:
Removed the mutable global
argvInput
, which is only used by config parsing, and instead use a closure with it to create the config parser. Not strictly necessary by any means, but I have strong feelings about side effects like this, so please holler at me if the curried function appears more confusing than the exported variable.docs
Result
What will change as a result of your pull request? Note that sometimes this section is unnecessary because it is self-explanatory based on the solution.
Testing
Describe the manual and automated tests you completed to verify the change is working as expected.