Add detection for incompatible flags with --run-file #1509
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.
Description
This PR adds detection for incompatible flags when using the
--run-file
flag in thedapr run
command. When a user tries to use command line flags that are incompatible with the run file configuration, a warning message is now displayed to inform the user that these flags will be ignored and should instead be configured in the run file.Issue reference
Please reference the issue this PR will close: #1508
Changes implemented
--run-file
optiondetectIncompatibleFlags
) that identifies when incompatible flags are being usedgenerateWarningMessage
) to create a clear warning for usersBehavior change
Before: When using both
--run-file
and other command-line flags that should be configured in the run file, the command-line flags were silently ignored, potentially causing confusion for users.After: When using both
--run-file
and incompatible command-line flags, a warning message is displayed to inform the user that these flags are ignored and should be configured in the run file.Example warning
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list: