Skip to content

Commit

Permalink
fix: fixed argument issue
Browse files Browse the repository at this point in the history
  • Loading branch information
niftylettuce committed Dec 14, 2019
1 parent dad6d88 commit 40515c6
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
Expand All @@ -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(','));
Expand Down

0 comments on commit 40515c6

Please sign in to comment.