Repository navigation
test: pin PowerShell quoting of dotted and special -D arguments - #2815
Open
maxandersen-agent wants to merge 1 commit into
Open
maxandersen-agent wants to merge 1 commit into
maxandersen-agent wants to merge 1 commit into
Conversation
PowerShell 5.1 splits an unquoted -Dfoo.bar=baz at the dot and passes the remainder on as a class name, so 'java -Dgroovy.grape.enable=false' fails with ClassNotFoundException. The escaper already quotes such arguments, but no test pinned that for PowerShell (the groovy option is only checked at collection time, javafx.preview is the only dotted -D escaping test). Adds regression tests for dotted names and values with spaces/quotes. Red-checked: treating '.' as a safe character fails them. Relates to jbangdev#1849 Co-authored-by: maxandersen-agent <362451386+maxandersen-agent@users.noreply.github.com>
maxandersen
marked this pull request as ready for review
December 4, 2026 17:27
maxandersen
approved these changes
Dec 4, 2026
Collaborator
|
this is just to safeguard we dont by accident break quoting of .'s for pwsh/windows |
Contributor
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
This branch has not been deployed
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.
pins the existing protection for dotted -D arguments on PowerShell (the #1849 trigger, -Dgroovy.grape.enable=false) with direct escaper tests. the escaper already quotes these; before this PR only javafx.preview covered it.
red check: treating '.' as safe makes the new dotted-name test fail, and the existing testPowershellEscapesUnsafeChars fails too.
Not fixed here: a colon in a -D name (-Dfoo:bar=baz) is dropped by PowerShell even when quoted, verified on Windows PowerShell 5.1. That needs a decision (warn or document), not an escaper change, so it's left out of this PR.
Relates to #1849