Repository navigation
Conversation
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.
Issue #, if available: None filed. Follows #548 and #554.
Description of changes
MavenValidator._get_jvm_stringdecodes each line ofmvn -versionwithline.decode(), which is strict UTF-8. Maven prints aMaven home:line before theJava versionline. On Windows with a non-UTF-8 locale and a non-ASCII user path (for exampleC:\Users\José), that line raisesUnicodeDecodeErrorand the build crashes before it starts.#554 fixed this for
gradle_validator.pyandmaven.pyby usingaws_lambda_builders.utils.decode. This change does the same inmaven_validator.py, which was missed.Description of how you validated changes
New unit test
test_does_not_fail_on_non_utf8_outputfeeds a cp1252-encodedMaven homeline before theJava versionline. It fails ondevelopwithUnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9and passes with this change. All 1078 unit tests pass.ruff checkandblack --checkare clean. I did not run it on Windows or run the fullmake pr.Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.