File tree 3 files changed +11
-3
lines changed
3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 6
6
'arch%' : 'i386'
7
7
}],
8
8
['OS=="win"' , {
9
- 'javahome%' : '<!(echo %JAVA_HOME% )'
9
+ 'javahome%' : '<!(node findJavaHome.js )'
10
10
}],
11
11
['OS=="linux" or OS=="mac" or OS=="freebsd" or OS=="openbsd"' , {
12
- 'javahome%' : '<!(echo $JAVA_HOME )'
12
+ 'javahome%' : '<!(node findJavaHome.js )'
13
13
}],
14
14
['OS=="mac"' , {
15
- 'javaver%' : "<!(awk -F/ -v h=$JAVA_HOME 'BEGIN {n=split(h, a); print a[2]; exit}')"
15
+ 'javaver%' : "<!(awk -F/ -v h=`node findJavaHome.js` 'BEGIN {n=split(h, a); print a[2]; exit}')"
16
16
}]
17
17
]
18
18
},
Original file line number Diff line number Diff line change
1
+ require ( 'find-java-home' ) ( function ( err , home ) {
2
+ if ( err ) {
3
+ console . error ( "[node-java] " + err ) ;
4
+ process . exit ( 1 ) ;
5
+ }
6
+ process . stdout . write ( home ) ;
7
+ } ) ;
Original file line number Diff line number Diff line change 26
26
"url" : " https://github.com/joeferner/node-java.git"
27
27
},
28
28
"dependencies" : {
29
+ "find-java-home" : " 0.0.3"
29
30
},
30
31
"devDependencies" : {
31
32
"nodeunit" : " ~0.6.4" ,
You can’t perform that action at this time.
0 commit comments