Skip to content

Commit 2ee51e7

Browse files
author
Glyn Normington
committed
Merge 51899933-Play-container to master
[#51899933]
2 parents 2d3d297 + fa8581a commit 2ee51e7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • lib/java_buildpack/container

lib/java_buildpack/container/play.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ def compile
5858
# @return [String] the command to run the application.
5959
def release
6060
@java_opts << "-D#{KEY_HTTP_PORT}=$PORT"
61-
# Change single quotes to double quotes with escape so that options such as
62-
# -XX:OnOutOfMemoryError='kill -9 %p' pass through the Play start script correctly.
63-
quoted_java_opts = java_opts.gsub("'", '\"')
64-
"PATH=#{@java_home}/bin:$PATH JAVA_HOME=#{@java_home} ./#{PLAY_START_SCRIPT} #{quoted_java_opts}"
61+
# Expunge the option OnOutOfMemoryError option if it occurs as it does not seem possible to pass
62+
# this through to the Play start script correctly.
63+
sanitised_java_opts = java_opts.gsub("-XX:OnOutOfMemoryError='kill -9 %p'", '')
64+
"PATH=#{@java_home}/bin:$PATH JAVA_HOME=#{@java_home} ./#{PLAY_START_SCRIPT} #{sanitised_java_opts}"
6565
end
6666

6767
private

0 commit comments

Comments
 (0)