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:
Rich Trott authored and Michaël Zasso committed 2021-04-29 13:45:32 +02:00
1 parent 02e875c645
commit d65615e119
1 file changed
+1 -12
+1 -12
View File
@@ -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>`);