From da736d8259331a8ef13bf4bbb10bbb8a5c0e5299 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 13 Aug 2019 12:29:07 +0200 Subject: remove node/v8 from source tree --- deps/node/deps/npm/lib/explore.js | 59 --------------------------------------- 1 file changed, 59 deletions(-) delete mode 100644 deps/node/deps/npm/lib/explore.js (limited to 'deps/node/deps/npm/lib/explore.js') diff --git a/deps/node/deps/npm/lib/explore.js b/deps/node/deps/npm/lib/explore.js deleted file mode 100644 index 826a527f..00000000 --- a/deps/node/deps/npm/lib/explore.js +++ /dev/null @@ -1,59 +0,0 @@ -// npm explore [@] -// open a subshell to the package folder. - -module.exports = explore -explore.usage = 'npm explore [ -- ]' -explore.completion = require('./utils/completion/installed-shallow.js') - -var npm = require('./npm.js') -var spawn = require('./utils/spawn') -var path = require('path') -var fs = require('graceful-fs') -var isWindowsShell = require('./utils/is-windows-shell.js') -var escapeExecPath = require('./utils/escape-exec-path.js') -var escapeArg = require('./utils/escape-arg.js') -var output = require('./utils/output.js') - -function explore (args, cb) { - if (args.length < 1 || !args[0]) return cb(explore.usage) - var p = args.shift() - - var cwd = path.resolve(npm.dir, p) - var opts = {cwd: cwd, stdio: 'inherit'} - - var shellArgs = [] - if (args) { - if (isWindowsShell) { - var execCmd = escapeExecPath(args.shift()) - var execArgs = [execCmd].concat(args.map(escapeArg)) - opts.windowsVerbatimArguments = true - shellArgs = ['/d', '/s', '/c'].concat(execArgs) - } else { - shellArgs.unshift('-c') - shellArgs = ['-c', args.map(escapeArg).join(' ').trim()] - } - } - - var sh = npm.config.get('shell') - fs.stat(cwd, function (er, s) { - if (er || !s.isDirectory()) { - return cb(new Error( - "It doesn't look like " + p + ' is installed.' - )) - } - - if (!shellArgs.length) { - output( - '\nExploring ' + cwd + '\n' + - "Type 'exit' or ^D when finished\n" - ) - } - - var shell = spawn(sh, shellArgs, opts) - shell.on('close', function (er) { - // only fail if non-interactive. - if (!shellArgs.length) return cb() - cb(er) - }) - }) -} -- cgit v1.2.3