$21 GRAYBYTE WORDPRESS FILE MANAGER $92

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/lib/node_modules/npm/node_modules/node-gyp/lib/

HOME
Current File : /lib/node_modules/npm/node_modules/node-gyp/lib//find-node-directory.js
'use strict'

const path = require('path')
const log = require('npmlog')

function findNodeDirectory (scriptLocation, processObj) {
  // set dirname and process if not passed in
  // this facilitates regression tests
  if (scriptLocation === undefined) {
    scriptLocation = __dirname
  }
  if (processObj === undefined) {
    processObj = process
  }

  // Have a look to see what is above us, to try and work out where we are
  var npmParentDirectory = path.join(scriptLocation, '../../../..')
  log.verbose('node-gyp root', 'npm_parent_directory is ' +
              path.basename(npmParentDirectory))
  var nodeRootDir = ''

  log.verbose('node-gyp root', 'Finding node root directory')
  if (path.basename(npmParentDirectory) === 'deps') {
    // We are in a build directory where this script lives in
    // deps/npm/node_modules/node-gyp/lib
    nodeRootDir = path.join(npmParentDirectory, '..')
    log.verbose('node-gyp root', 'in build directory, root = ' +
                nodeRootDir)
  } else if (path.basename(npmParentDirectory) === 'node_modules') {
    // We are in a node install directory where this script lives in
    // lib/node_modules/npm/node_modules/node-gyp/lib or
    // node_modules/npm/node_modules/node-gyp/lib depending on the
    // platform
    if (processObj.platform === 'win32') {
      nodeRootDir = path.join(npmParentDirectory, '..')
    } else {
      nodeRootDir = path.join(npmParentDirectory, '../..')
    }
    log.verbose('node-gyp root', 'in install directory, root = ' +
                nodeRootDir)
  } else {
    // We don't know where we are, try working it out from the location
    // of the node binary
    var nodeDir = path.dirname(processObj.execPath)
    var directoryUp = path.basename(nodeDir)
    if (directoryUp === 'bin') {
      nodeRootDir = path.join(nodeDir, '..')
    } else if (directoryUp === 'Release' || directoryUp === 'Debug') {
      // If we are a recently built node, and the directory structure
      // is that of a repository. If we are on Windows then we only need
      // to go one level up, everything else, two
      if (processObj.platform === 'win32') {
        nodeRootDir = path.join(nodeDir, '..')
      } else {
        nodeRootDir = path.join(nodeDir, '../..')
      }
    }
    // Else return the default blank, "".
  }
  return nodeRootDir
}

module.exports = findNodeDirectory

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
1 Jan 1970 8.00 AM
root / root
0
Find-VisualStudio.cs
7.745 KB
10 Mar 2021 9.36 PM
root / root
0644
build.js
5.164 KB
10 Mar 2021 9.36 PM
root / root
0644
clean.js
0.347 KB
10 Mar 2021 9.36 PM
root / root
0644
configure.js
12.043 KB
10 Mar 2021 9.36 PM
root / root
0644
find-node-directory.js
2.317 KB
10 Mar 2021 9.36 PM
root / root
0644
find-python.js
10.884 KB
10 Mar 2021 9.36 PM
root / root
0644
find-visualstudio.js
13.534 KB
10 Mar 2021 9.36 PM
root / root
0644
install.js
14.012 KB
10 Mar 2021 9.36 PM
root / root
0644
list.js
0.626 KB
10 Mar 2021 9.36 PM
root / root
0644
node-gyp.js
4.573 KB
10 Mar 2021 9.36 PM
root / root
0644
process-release.js
5.651 KB
10 Mar 2021 9.36 PM
root / root
0644
proxy.js
2.568 KB
10 Mar 2021 9.36 PM
root / root
0644
rebuild.js
0.307 KB
10 Mar 2021 9.36 PM
root / root
0644
remove.js
1.277 KB
10 Mar 2021 9.36 PM
root / root
0644
util.js
1.869 KB
10 Mar 2021 9.36 PM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF