Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update vnu-jar.js from upstream #1633

Merged
merged 1 commit into from
Mar 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions build/vnu-jar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

/*!
* Script to run vnu-jar if Java is available.
* Copyright 2017-2022 The Bootstrap Authors
* Copyright 2017-2022 Twitter, Inc.
* Copyright 2017-2023 The Bootstrap Authors
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/

Expand All @@ -14,10 +13,13 @@ const vnu = require('vnu-jar')

execFile('java', ['-version'], (error, stdout, stderr) => {
if (error) {
console.error('Skipping vnu-jar test; Java is missing.')
console.error('Skipping vnu-jar test; Java is probably missing.')
console.error(error)
return
}

console.log('Running vnu-jar validation...')

const is32bitJava = !/64-Bit/.test(stderr)

// vnu-jar accepts multiple ignores joined with a `|`.
Expand All @@ -40,6 +42,8 @@ execFile('java', ['-version'], (error, stdout, stderr) => {
args.splice(0, 0, '-Xss512k')
}

console.log(`command used: java ${args.join(' ')}`)

return spawn('java', args, {
shell: true,
stdio: 'inherit'
Expand Down