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.'); |
||
0 ignored issues
–
show
Debugging Code
introduced
by
![]() |
|||
16 | |||
17 | process.exit(); |
||
0 ignored issues
–
show
Compatibility
Debugging Code
Best Practice
introduced
by
|
|||
18 | } |
||
19 | }; |
||
20 |