From: XhmikosR Date: Tue, 22 Jun 2021 09:52:10 +0000 (+0300) Subject: Manually backport #34075 and #34279 X-Git-Tag: v4.6.1~39 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=ec986fcb57b4c37430d80b5a06ca82d0bee8eb74;p=thirdparty%2Fbootstrap.git Manually backport #34075 and #34279 Improve and clean up vnu-jar.js --- diff --git a/build/vnu-jar.js b/build/vnu-jar.js index 48ef364345..270f7c575b 100644 --- a/build/vnu-jar.js +++ b/build/vnu-jar.js @@ -9,10 +9,10 @@ 'use strict' -const childProcess = require('child_process') +const { execFile, spawn } = require('child_process') const vnu = require('vnu-jar') -childProcess.exec('java -version', (error, stdout, stderr) => { +execFile('java', ['-version'], (error, stdout, stderr) => { if (error) { console.error('Skipping vnu-jar test; Java is missing.') return @@ -21,19 +21,12 @@ childProcess.exec('java -version', (error, stdout, stderr) => { const is32bitJava = !/64-Bit/.test(stderr) // vnu-jar accepts multiple ignores joined with a `|`. - // Also note that the ignores are regular expressions. + // Also note that the ignores are string regular expressions. const ignores = [ // "autocomplete" is included in