We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1fde800 commit 52ccb8aCopy full SHA for 52ccb8a
1 file changed
tools/checkMono.js
@@ -1,12 +1,21 @@
1
-const { exec, spawn, spawnSync } = require('child_process');
+const { exec } = require('child_process');
2
3
-function exists(cmd){
+function exists(cmd, cb){
4
exec(cmd, function (err, stdout, stderr) {
5
- return stdout.toLowerCase().includes('not found') ? false : true;
+ let result
6
+ if(err){
7
+ result = false;
8
+ }
9
+ else{
10
+ result = stdout.toLowerCase().includes('not found') || stdout.length === 0 ? false : true
11
12
+ cb(result);
13
});
14
}
15
-let mono = exists('which mono');
-let pkgconfig = exists('which pkg-config');
-return mono && pkgconfig;
16
+exists('which mono', (mono)=>{
17
+ exists('which pkg-config', (pkgconfig)=>{
18
+ console.log(mono && pkgconfig)
19
+ });
20
+});
21
0 commit comments