gnodet commented on PR #12546:
URL: https://github.com/apache/maven/pull/12546#issuecomment-5100813048
The macOS CI failures (all 22 assertion failures in
`test-mvn-path-conversion.sh`) are caused by a double-slash in the temp
directory path.
**Root cause:** On macOS, `$TMPDIR` ends with a trailing `/` (e.g.
`/var/folders/.../T/`). When the test runs `mktemp -d
"${TMPDIR}/mvn-path-conversion.XXXXXX"`, it produces a path with `//` (e.g.
`.../T//mvn-path-conversion.XNBzZw`). The `pwd` builtin inside the `mvn`
launcher normalizes this to a single `/`, so every assertion comparing the
test's `$project_dir` / `$maven_home` against the actual launcher output
mismatches.
**Fix:** Normalize `work_dir` through `cd/pwd` right after `mktemp`:
```sh
work_dir=`mktemp -d "${TMPDIR:-/tmp}/mvn-path-conversion.XXXXXX"`
work_dir=`cd "$work_dir" && pwd`
```
I've opened #12563 with this one-line fix applied on top of this PR's commit.
--
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]