Total Complexity | 3 |
Complexity/F | 3 |
Lines of Code | 19 |
Function Count | 1 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | var hasbin = require('hasbin'); |
||
2 | var fs = require('fs'); |
||
3 | var path = require('path'); |
||
4 | |||
5 | module.exports = { |
||
6 | path: function() { |
||
7 | if (fs.existsSync('./vendor/bin/jigsaw')) { |
||
8 | return path.normalize('./vendor/bin/jigsaw') |
||
9 | } |
||
10 | |||
11 | if (hasbin.sync('jigsaw')) { |
||
12 | return 'jigsaw'; |
||
13 | } |
||
14 | |||
15 | console.log('Could not find Jigsaw; please install it via Composer, either locally or globally.'); |
||
|
|||
16 | |||
17 | process.exit(); |
||
18 | } |
||
19 | }; |
||
20 |