From: XhmikosR Date: Tue, 8 Jun 2021 05:44:51 +0000 (+0300) Subject: Improve vnu-jar.js (#34075) X-Git-Tag: v5.0.2~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=232a40a5f1a49efd6b41e851564c8b7cd654299d;p=thirdparty%2Fbootstrap.git Improve vnu-jar.js (#34075) * switch to `execFile` for the java version command * simplify our ignores and removed no longer needed ones * remove `--no-langdetect` since it doesn't seem to trigger any issues any more --- diff --git a/build/vnu-jar.js b/build/vnu-jar.js index 7a912675e1..d031cc89be 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,23 +21,15 @@ 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