Skip to content

Commit

Permalink
debugger: remove unused code
Browse files Browse the repository at this point in the history
Remove code that was for when `node-inspect` was called as a standalone
process.

PR-URL: #38161
Refs: #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>
  • Loading branch information
Trott authored and targos committed Apr 29, 2021
1 parent 02e875c commit d65615e
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions lib/internal/inspector/_inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down Expand Up @@ -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>`);
Expand Down

0 comments on commit d65615e

Please sign in to comment.