armorbreak001 opened a new pull request, #417:
URL: https://github.com/apache/maven-wrapper/pull/417

   When an IDE or code formatter adds spaces around `=` in
   `maven-wrapper.properties` (e.g. `distributionUrl = https://...`),
   the shell parser's `IFS="="` split leaves trailing whitespace
   in the key variable. This causes the `case` pattern match to miss,
   resulting in the error:
   
   ```
   cannot read distributionUrl property in 
./.mvn/wrapper/maven-wrapper.properties
   ```
   
   The `trim()` function was already being applied to values but not to
   keys. This commit adds `key=$(trim "${key-}")` in all three
   property-parsing loops:
   
   - **mvnw** — `wrapperUrl` download URL lookup (line ~227)
   - **mvnw** — `wrapperSha256Sum` validation lookup (line ~284)
   - **only-mvnw** — `distributionUrl` and `distributionSha256Sum` lookup (line 
~112)
   
   **Before fix:** `distributionUrl  = value` → key=`"distributionUrl  "` → no 
match → crash
   **After fix:** key trimmed to `"distributionUrl"` → match succeeds
   
   Fixes #369


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to