networkInterfaces() bug fix (osx)

This commit is contained in:
Sebastian Hildebrandt
2020-01-01 08:29:50 +01:00
parent 9ff4519665
commit d3f123c6e1
7 changed files with 31 additions and 8 deletions
+2 -3
View File
@@ -294,7 +294,7 @@ function parseLinesDarwinNics(sections) {
}
function getDarwinNics() {
const cmd = 'ifconfig -v';
const cmd = '/sbin/ifconfig -v';
try {
const lines = execSync(cmd, util.execOptsWin).toString().split('\n');
const nsections = splitSectionsNics(lines);
@@ -1075,9 +1075,8 @@ function networkGatewayDefault(callback) {
if (callback) { callback(result); }
resolve(result);
});
}
})
});
} catch (e) {
if (callback) { callback(result); }
resolve(result);