1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
node-red-nodes/hardware/sensorTag/scripts/checkplatform.js
Ben Hardill d9c551c026 Fix SensorTag node on Windows (#246)
Fix windows install 
(or rather - only run the postinstall if on Linux)
Thanks @hardillb
2016-11-02 09:55:06 +00:00

17 lines
339 B
JavaScript

var spawn = require('child_process').spawn;
if (process.argv.length === 3) {
var command = process.argv[2];
if (process.platform === 'linux') {
var dir = __dirname;
var script = spawn(dir + "/" + command);
script.on('close',function(code){
process.exit(code);
});
} else {
process.exit(0);
}
} else {
process.exit(0);
}