sbt/launcher-package/integration-test/src/test/scala
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
..
BspConfigTest.scala [2.x] feat: sbtw launcher (#8742) 2026-02-16 16:21:30 -05:00
ExtendedRunnerTest.scala [2.x] feat: sbtw launcher (#8742) 2026-02-16 16:21:30 -05:00
IntegrationTestPaths.scala [2.x] feat: sbtw launcher (#8742) 2026-02-16 16:21:30 -05:00
LauncherTestHelper.scala [2.x] feat: sbtw launcher (#8742) 2026-02-16 16:21:30 -05:00
RunnerMemoryScriptTest.scala fix: Handle -X JVM options on command line (fixes #5742) (#8566) 2026-01-17 14:29:30 -05:00
RunnerScriptTest.scala [2.x] fix: Support inline comments in .jvmopts and .sbtopts files (#8758) 2026-02-17 14:42:16 -05:00
ShellScriptUtil.scala [2.x] feat: sbtw launcher (#8742) 2026-02-16 16:21:30 -05:00