networkInterfaces() prevent error getting DHCP Nics

This commit is contained in:
Sebastian Hildebrandt 2020-01-12 12:11:53 +01:00
parent 89a48ca696
commit 7108344dbd

View File

@ -488,7 +488,7 @@ function getLinuxIfaceConnectionName(interfaceName) {
function getLinuxDHCPNics() { function getLinuxDHCPNics() {
// alternate methods getting interfaces using DHCP // alternate methods getting interfaces using DHCP
let cmd = 'ip a'; let cmd = 'ip a 2> /dev/null';
let result = []; let result = [];
try { try {
const lines = execSync(cmd, { maxBuffer: 1024 * 20000 }).toString().split('\n'); const lines = execSync(cmd, { maxBuffer: 1024 * 20000 }).toString().split('\n');