Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NAlexandrov committed Mar 25, 2019
1 parent 83a76b4 commit f0400c7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/username.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

module.exports = function (str) {
if (!str || str === '') {
if (!str) {
return {
domain: null,
username: null
Expand Down
1 change: 0 additions & 1 deletion lib/wmic.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ var getos = require('./getos');
var path = require('path');
var readline = require('readline');
var spawn = require('child_process').spawn;
var stream = require('stream');

var getNamespace = require('./namespace.js');
var getUsername = require('./username.js');
Expand Down
10 changes: 4 additions & 6 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
'use strict';

if(process.platform === 'win32') {
let WmiClient = require('../');
let wmi = new WmiClient();
var WmiClient = require('../');
var wmi = new WmiClient();

wmi.query('SELECT * FROM Win32_Process', function (err, result) {
if(err === null && result.length > 0) {
console.log('Test "SELECT *" success!');
}
else {
} else {
console.log('Test "SELECT *" failure!');
console.log(err);
}
Expand All @@ -17,8 +16,7 @@ if(process.platform === 'win32') {
wmi.query('SELECT Name FROM Win32_Process', function (err, result) {
if(err === null && result.length > 0) {
console.log('Test "SELECT Name" success!');
}
else {
} else {
console.log('Test "SELECT Name" failure!');
console.log(err);
}
Expand Down

0 comments on commit f0400c7

Please sign in to comment.