aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <[email protected]>2017-10-31 13:06:39 +0200
committerXhmikosR <[email protected]>2017-10-31 21:36:17 +0200
commitdde280618cce4efdce5652943634950c93ed62a5 (patch)
treed2f89b553f8b9b6edc072832de5e83ac31302923
parent930783cb242a8b94ac14bc93d1a1974c6237f218 (diff)
downloadbootstrap-dde280618cce4efdce5652943634950c93ed62a5.tar.xz
bootstrap-dde280618cce4efdce5652943634950c93ed62a5.zip
vnu-jar.js: pass `-Xss512k` for 32-bit Java to avoid a StackOverflowError error.
-rw-r--r--build/vnu-jar.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/build/vnu-jar.js b/build/vnu-jar.js
index f31b9795a..ea894ac06 100644
--- a/build/vnu-jar.js
+++ b/build/vnu-jar.js
@@ -12,12 +12,14 @@
const childProcess = require('child_process')
const vnu = require('vnu-jar')
-childProcess.exec('java -version', (error) => {
+childProcess.exec('java -version', (error, stdout, stderr) => {
if (error) {
console.error('Skipping HTML lint test; Java is missing.')
return
}
+ const is32bitJava = !stderr.match(/64-Bit/)
+
// vnu-jar accepts multiple ignores joined with a `|`
const ignores = [
'Attribute “autocomplete” is only allowed when the input type is “color”, “date”, “datetime-local”, “email”, “hidden”, “month”, “number”, “password”, “range”, “search”, “tel”, “text”, “time”, “url”, or “week”.',
@@ -44,6 +46,11 @@ childProcess.exec('java -version', (error) => {
'js/tests/'
]
+ // For the 32-bit Java we need to pass `-Xss512k`
+ if (is32bitJava) {
+ args.splice(0, 0, '-Xss512k')
+ }
+
return childProcess.spawn('java', args, {
shell: true,
stdio: 'inherit'