mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
debugger: remove unused code
Remove code that was for when `node-inspect` was called as a standalone process. PR-URL: https://github.com/nodejs/node/pull/38161 Refs: https://github.com/nodejs/node/discussions/36481 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Michaël Zasso <targos@protonmail.com>
This commit is contained in:
1 parent
02e875c645
commit
d65615e119
1 file changed
+1
-12
@@ -29,16 +29,7 @@ const { EventEmitter } = require('events');
|
||||
const net = require('net');
|
||||
const util = require('util');
|
||||
|
||||
const runAsStandalone = typeof __dirname !== 'undefined';
|
||||
|
||||
const { 0: InspectClient, 1: createRepl } =
|
||||
runAsStandalone ?
|
||||
// This copy of node-inspect is on-disk, relative paths make sense.
|
||||
[
|
||||
require('./inspect_client'),
|
||||
require('./inspect_repl'),
|
||||
] :
|
||||
// This copy of node-inspect is built into the node executable.
|
||||
[
|
||||
require('internal/inspector/inspect_client'),
|
||||
require('internal/inspector/inspect_repl'),
|
||||
@@ -336,9 +327,7 @@ function startInspect(argv = process.argv.slice(2),
|
||||
stdin = process.stdin,
|
||||
stdout = process.stdout) {
|
||||
if (argv.length < 1) {
|
||||
const invokedAs = runAsStandalone ?
|
||||
'node-inspect' :
|
||||
`${process.argv0} ${process.argv[1]}`;
|
||||
const invokedAs = `${process.argv0} ${process.argv[1]}`;
|
||||
|
||||
console.error(`Usage: ${invokedAs} script.js`);
|
||||
console.error(` ${invokedAs} <host>:<port>`);
|
||||
|
||||
Reference in new issue
Block a user