Updated to check script version on linux, as older versions that 2.25 does not work correctly.
Bryan Roe committed
Jan 17, 2020 at 15:08 UTC
a89b7401cfd2328655f8a551d326ea2edab72335
1 file changed
+10
-1
agents/meshcore.js
+10
-1
@@ -1190,7 +1190,16 @@ function createMeshCore(agent) {
1190
try {
1191
var bash = fs.existsSync('/bin/bash') ? '/bin/bash' : false;
1192
var sh = fs.existsSync('/bin/sh') ? '/bin/sh' : false;
1193
- var script = fs.existsSync('/usr/bin/script') ? '/usr/bin/script' : false;
1193
+ var script = false;
1194
+ if (require('linux-gnome-helpers').scriptVersion)
1195
+ {
1196
+ if (require('linux-gnome-helpers').scriptVersion.major > 2 ||
1197
+ (require('linux-gnome-helpers').scriptVersion.major == 2 && require('linux-gnome-helpers').scriptVersion.minor >= 25))
1198
+ {
1199
+ script = '/usr/bin/script';
1200
+ }
1201
+ }
1202
+
1203
var python = fs.existsSync('/usr/bin/python') ? '/usr/bin/python' : false;
1204
var shell = bash || sh;
1205