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
Backport-PR-URL: #38858
Refs: #36481
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Jan Krems <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Stephen Belanger <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
  • Loading branch information
Trott authored and richardlau committed Jul 20, 2021
1 parent fc219d8 commit 0321c5b
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 0321c5b

Please sign in to comment.