Skip to content

Conversation

@Malax
Copy link
Member

@Malax Malax commented Dec 3, 2025

When users set SBT_OPTS with sbt-style JVM arguments like -J-Xmx1G, the buildpack now automatically removes the -J prefix before passing them to Java.

This fixes issues where users familiar with sbt's command-line syntax would configure SBT_OPTS=-J-Xmx1G -J-Xms512m, which would fail because the buildpack invokes Java directly rather than using sbt's launcher script.

This is a temporary solution. In the future, we'll migrate to using the official sbt runner script, which will handle the -J prefix natively and eliminate the need for this sanitization. (#308)

GUS-W-20413045

@Malax Malax changed the title Sanitize SBT_OPTS to remove -J prefix from arguments Sanitize SBT_OPTS to remove -J prefix from arguments Dec 3, 2025
@Malax Malax marked this pull request as ready for review December 3, 2025 17:07
@Malax Malax requested a review from a team as a code owner December 3, 2025 17:07
@Malax Malax merged commit c6e40a5 into main Dec 3, 2025
5 checks passed
@Malax Malax deleted the malax/sbt-opts-sanitation branch December 3, 2025 17:07
@heroku-linguist heroku-linguist bot mentioned this pull request Dec 3, 2025
@edmorley edmorley removed the request for review from a team December 3, 2025 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants