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.
  • Loading branch information
Trott committed Apr 16, 2021
1 parent 839d9f0 commit 40777ff
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 @@ -28,16 +28,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 @@ -335,9 +326,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 40777ff

Please sign in to comment.