Skip to content

Commit fc4757c

Browse files
committed
debugger: remove unused code
Remove code that was for when `node-inspect` was called as a standalone process.
1 parent ab10881 commit fc4757c

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

lib/internal/inspector/_inspect.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,7 @@ const { EventEmitter } = require('events');
2828
const net = require('net');
2929
const util = require('util');
3030

31-
const runAsStandalone = typeof __dirname !== 'undefined';
32-
3331
const { 0: InspectClient, 1: createRepl } =
34-
runAsStandalone ?
35-
// This copy of node-inspect is on-disk, relative paths make sense.
36-
[
37-
require('./inspect_client'),
38-
require('./inspect_repl'),
39-
] :
40-
// This copy of node-inspect is built into the node executable.
4132
[
4233
require('internal/inspector/inspect_client'),
4334
require('internal/inspector/inspect_repl'),
@@ -335,9 +326,7 @@ function startInspect(argv = process.argv.slice(2),
335326
stdin = process.stdin,
336327
stdout = process.stdout) {
337328
if (argv.length < 1) {
338-
const invokedAs = runAsStandalone ?
339-
'node-inspect' :
340-
`${process.argv0} ${process.argv[1]}`;
329+
const invokedAs = `${process.argv0} ${process.argv[1]}`;
341330

342331
console.error(`Usage: ${invokedAs} script.js`);
343332
console.error(` ${invokedAs} <host>:<port>`);

0 commit comments

Comments
 (0)