sbt/launcher-package/integration-test
Lazz 02d9d4c699
[2.x] fix: Support inline comments in .jvmopts and .sbtopts files (#8758)
**Problem**
After PR #8730 (commit 921efce), inline comments in .jvmopts and .sbtopts files cause errors.
For example, `--add-opens=java.base/java.util=ALL-UNNAMED # comment` results in:
Error: Could not find or load main class #

The # and everything after it is now parsed as separate arguments instead of being stripped as a comment.

**Solution**
Update the sed command in outputConfigFileTokens() to strip inline comments (everything from # to end of line) before parsing tokens.

The new s/\s*\#.*// pattern matches optional whitespace + # + rest of line and removes it.

Generated-by: Claude Sonnet 4.5
2026-02-17 14:42:16 -05:00
..
bin move to launcher-package/ 2021-04-19 10:45:29 -04:00
src/test/scala [2.x] fix: Support inline comments in .jvmopts and .sbtopts files (#8758) 2026-02-17 14:42:16 -05:00