1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-15 07:43:50 +00:00

Added zenity.version

This commit is contained in:
Bryan Roe
2019-08-21 22:50:53 -07:00
parent 994aaaf30d
commit 0469531f02
2 changed files with 14 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@@ -146,7 +146,15 @@ function linux_messageBox()
child.stdin.write(location + ' --help-all | grep timeout\nexit\n');
child.waitExit();
return ({ path: location, timeout: child.stdout.str.trim() == '' ? false : true });
var ret = { path: location, timeout: child.stdout.str.trim() == '' ? false : true };
child = require('child_process').execFile('/bin/sh', ['sh']);
child.stdout.str = ''; child.stdout.on('data', function (chunk) { this.str += chunk.toString(); });
child.stdin.write(location + ' --version | awk -F. \'{ printf "[%s, %s]\\n", $1, $2; } \'\nexit\n');
child.waitExit();
ret.version = JSON.parse(child.stdout.str.trim());
return (ret);
})()
});
if (!this.zenity)