choksi2212 commented on PR #13429:
URL: https://github.com/apache/maven/pull/13429#issuecomment-6122464318

   Good catch, thank you — reproduced and fixed in 4883fca.
   
   I confirmed the truncation empirically before changing anything: running the 
new harness under `dash` with a `c`-prefixed component in the temp directory 
(`TMPDIR=/tmp/mvnprobe/cache`) makes the exact assertion you cited fail on the 
pre-fix code — the warning is cut to `...converts to 
"C:\Anaconda\Library\tmp\mvnprobe` (everything after `\c` dropped), so `which 
does not exist` never reaches the user. The same run with the `printf '%s\n'` 
form passes.
   
   The block now uses `printf` for all four warning lines, verbatim as 
suggested. The remaining `echo` calls in the launcher only print plain literals 
without backslashes, which the header note (echo vs printf) already documents 
as safe.
   
   Verified after the change, both directions:
   - harness under `dash`, c-free temp dir: all assertions pass
   - harness under `dash`, `cache` temp dir: all assertions pass (was: 1 
failure, truncated warning)
   - pre-fix code (echo restored) + `cache` temp dir: the failure reproduces, 
so the assertion is load-bearing for this follow-up too
   
   `sh -n` on the modified launcher is clean as well.
   


-- 
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