Last active
August 26, 2018 00:04
-
-
Save Fliktrax/8e1aed6719dd66749c37290bd01cd662 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sys = require('util') | |
var exec = require('child_process').exec; | |
var child; | |
var bashos = 'unix'; | |
child = exec("echo $PATH", function (error, stdout, stderr) { | |
if( (stdout.indexOf('Windows') > -1) || (stdout.indexOf('System32') > -1) ) { | |
bashos = 'windows'; | |
} | |
console.log(bashos); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment