Skip to content

Commit 94c14ea

Browse files
authored
Merge pull request gocd#11222 from chadlwilson/remove-wrapper-stdin
Fix issues with wrapper stalling or crashing on container starts
2 parents 54d66f5 + c2cb696 commit 94c14ea

2 files changed

Lines changed: 4 additions & 10 deletions

File tree

installers/generic.gradle

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ def configureGenericZip(Zip zipTask, InstallerType installerType) {
145145
if (eachLine == '#encoding=UTF-8') {
146146
def newLines = [
147147
'#encoding=UTF-8',
148-
'wrapper.working.dir=..'
148+
'wrapper.working.dir=..',
149+
'wrapper.disable_console_input=TRUE'
149150
]
150151

151152
installerType.additionalEnvVars.forEach { k, v ->
@@ -165,10 +166,6 @@ def configureGenericZip(Zip zipTask, InstallerType installerType) {
165166
eachLine = newLines.join('\n')
166167
}
167168

168-
if (eachLine == 'wrapper.java.additional.auto_bits=TRUE') {
169-
eachLine = 'wrapper.java.additional.auto_bits=FALSE'
170-
}
171-
172169
if (eachLine == 'wrapper.java.classpath.1=../lib/wrapper.jar') {
173170
eachLine = [
174171
'wrapper.java.classpath.1=wrapper/wrapper.jar',

installers/linux.gradle

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ def configureLinuxPackage(DefaultTask packageTask, InstallerType installerType,
204204
if (eachLine == '#encoding=UTF-8') {
205205
def newLines = [
206206
'#encoding=UTF-8',
207-
"wrapper.working.dir=/var/lib/${installerType.baseName}"
207+
"wrapper.working.dir=/var/lib/${installerType.baseName}",
208+
'wrapper.disable_console_input=TRUE'
208209
]
209210

210211
(installerType.additionalEnvVars + installerType.additionalLinuxEnvVars).forEach { k, v ->
@@ -227,10 +228,6 @@ def configureLinuxPackage(DefaultTask packageTask, InstallerType installerType,
227228
eachLine = newLines.join('\n')
228229
}
229230

230-
if (eachLine == 'wrapper.java.additional.auto_bits=TRUE') {
231-
eachLine = 'wrapper.java.additional.auto_bits=FALSE'
232-
}
233-
234231
if (eachLine == 'wrapper.java.command=java') {
235232
eachLine = "wrapper.java.command=/usr/share/${installerType.baseName}/jre/bin/java"
236233
}

0 commit comments

Comments
 (0)