Add --error-on-warn flag to exit 1 on warnings #345
Merged
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.
This addresses the scenario described in #314. I'm not sure if this is a desirable addition to the project but we are running into issues with automated dependency updates not taking into consideration patched dependencies and would like to prevent these warnings from making it onto our main branch.
The change is pretty minimal and follows the pattern that the
--error-on-fail
flag took. This changes theprocess.exit
logic at the end ofapplyPatchesForApp
and gives that function a new parameter,shouldExitWithWarning
that looks at the flag boolean value. There are a couple of questions that I have:shouldExitWithWarning
make sense? I may be misunderstanding terminology in variable names so please feel free to suggest something better.--error-on-fail
? I did not fully understand if that would be a good idea here.Feel free to close out if not interested in this addition or request changes if this doesn't seem like the correct implementation.