FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

removed debugging output. added removal of repeated jre/jre etc in so… · facboy/node-java@87958e7 · GitHub

Commit 87958e7

Browse files
committed
removed debugging output. added removal of repeated jre/jre etc in so path
1 parent a19605a commit 87958e7

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

‎postInstall.js‎

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ require('find-java-home')(function(err, home){
3030
});
3131

3232
function getCorrectSoForPlatform(soFiles){
33+
var so = getCorrectSoForPlatform(soFiles);
34+
return removeDuplicateJre(so);
35+
}
36+
37+
function removeDuplicateJre(filePath){
38+
while(filePath.indexOf('jre/jre')>0){
39+
filePath = filePath.replace('jre','');
40+
}
41+
return filePath;
42+
}
43+
44+
function _getCorrectSoForPlatform(soFiles){
3345

3446
var architectureFolderNames = {
3547
'ia32': 'i386',
@@ -43,14 +55,10 @@ function getCorrectSoForPlatform(soFiles){
4355

4456
for (var i = 0; i < soFiles.length; i++) {
4557
var so = soFiles[i];
46-
47-
console.log('so',so,requiredFolderName);
4858

49-
if(so.indexOf('server'))
50-
if(so.indexOf(requiredFolderName)) {
51-
console.log('match',so)
59+
if(so.indexOf('server')>0)
60+
if(so.indexOf(requiredFolderName)>0)
5261
return so;
53-
}
5462
}
5563

5664
return soFiles[0];

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL