File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change 11/* eslint-disable required-modules */ 
22'use strict' ; 
3+ const  common  =  require ( '../common' ) ; 
34const  path  =  require ( 'path' ) ; 
45
56// If node executable is linked to shared lib, need to take care about the 
@@ -27,3 +28,17 @@ exports.addLibraryPath = function(env) {
2728    ( env . PATH  ? env . PATH  +  path . delimiter  : '' )  + 
2829    path . dirname ( process . execPath ) ; 
2930} ; 
31+ 
32+ // Get the full path of shared lib 
33+ exports . getSharedLibPath  =  function ( )  { 
34+   if  ( common . isWindows )  { 
35+     return  path . join ( path . dirname ( process . execPath ) ,  'node.dll' ) ; 
36+   }  else  if  ( common . isOSX )  { 
37+     return  path . join ( path . dirname ( process . execPath ) , 
38+                      `libnode.${ process . config . variables . shlib_suffix }  ) ; 
39+   }  else  { 
40+     return  path . join ( path . dirname ( process . execPath ) , 
41+                      'lib.target' , 
42+                      `libnode.${ process . config . variables . shlib_suffix }  ) ; 
43+   } 
44+ } ; 
Original file line number Diff line number Diff line change 77const  common  =  require ( '../common' ) ; 
88const  assert  =  require ( 'assert' ) ; 
99const  {  spawnSync }  =  require ( 'child_process' ) ; 
10- const  args  =  [ process . execPath ] ; 
10+ const  {  getSharedLibPath }  =  require ( '../common/shared-lib-util.js' ) ; 
11+ 
12+ // For shared lib case, check shared lib instead 
13+ const  args  =  [ 
14+   process . config . variables . node_shared  ?
15+     getSharedLibPath ( )  : process . execPath 
16+ ] ; 
1117
1218if  ( common . isAIX ) 
1319  args . unshift ( '-Xany' ,  '-B' ) ; 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments