public ProcessBuilder prepareMainModuleResolveProcessBuilder(File packageRoot){
  final Builder<String> builder=ImmutableList.<String>builder();
  NodeJsBinary nodeBinary=nodeBinaryProvider.get();
  if (isWindows()) {
    builder.add(WIN_SHELL_COMAMNDS);
    builder.add(escapeBinaryPath(nodeBinary.getBinaryAbsolutePath()));
    builder.add("-e");
    builder.add("console.log(require.resolve('" + packageRoot.getName() + "'));");
  }
 else {
    builder.add(NIX_SHELL_COMAMNDS);
    builder.add(escapeBinaryPath(nodeBinary.getBinaryAbsolutePath()) + " -e \"console.log(require.resolve('" + packageRoot.getName()+ "'));\"");
  }
  return create(builder.build(),nodeBinary,packageRoot,false);
}

public ProcessBuilder prepareMainModuleResolveProcessBuilder ( File packageRoot ) { final Builder < String > builder = ImmutableList . < String > builder ( ) ; NodeJsBinary nodeBinary = nodeBinaryProvider . get ( ) ; if ( isWindows ( ) ) { builder . add ( WIN_SHELL_COMAMNDS ) ; builder . add ( escapeBinaryPath ( nodeBinary . getBinaryAbsolutePath ( ) ) ) ; builder . add ( "-e" ) ; builder . add ( "console.log(require.resolve('" + packageRoot . getName ( ) + "'));" ) ; } else { builder . add ( NIX_SHELL_COMAMNDS ) ; builder . add ( escapeBinaryPath ( nodeBinary . getBinaryAbsolutePath ( ) ) + " -e \"console.log(require.resolve('" + packageRoot . getName ( ) + "'));\"" ) ; } return create ( builder . build ( ) , nodeBinary , packageRoot , false ) ; }
prepares process builder configured to invoke node . js for main module resolution .
