From 40515c6ee830e8e923ec105e1312a49febb94328 Mon Sep 17 00:00:00 2001 From: niftylettuce Date: Fri, 13 Dec 2019 22:29:48 -0600 Subject: [PATCH] fix: fixed argument issue --- index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/index.js b/index.js index f9c5fc0..e8b0c2d 100644 --- a/index.js +++ b/index.js @@ -7,10 +7,8 @@ const filePath = path.join(__dirname, 'spfcheck2.py'); // ensure python installed if (!which('python3')) throw new Error(`Python v3.5+ is required`); -const silent = process.env.NODE_ENV !== 'test'; - // ensure python v3.5+ -let version = exec('python3 --version', { silent }); +let version = exec('python3 --version'); version = semver.coerce( (version.stdout || version.stderr).split(' ')[1].trim() ); @@ -24,7 +22,6 @@ module.exports = function(ip, address, host) { return new Promise((resolve, reject) => { exec( `python3 ${filePath} ${ip} ${address} ${host}`, - silent, (code, stdout, stderr) => { if (code !== 0) return reject(new Error(stderr)); resolve(stdout.trim().split(','));