Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d65615e

Browse filesBrowse files
Trotttargos
authored andcommitted
debugger: remove unused code
Remove code that was for when `node-inspect` was called as a standalone process. PR-URL: #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>
1 parent 02e875c commit d65615e
Copy full SHA for d65615e

File tree

Expand file treeCollapse file tree

1 file changed

+1
-12
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-12
lines changed
Open diff view settings
Collapse file

‎lib/internal/inspector/_inspect.js‎

Copy file name to clipboardExpand all lines: lib/internal/inspector/_inspect.js
+1-12Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,7 @@ const { EventEmitter } = require('events');
2929
const net = require('net');
3030
const util = require('util');
3131

32-
const runAsStandalone = typeof __dirname !== 'undefined';
33-
3432
const { 0: InspectClient, 1: createRepl } =
35-
runAsStandalone ?
36-
// This copy of node-inspect is on-disk, relative paths make sense.
37-
[
38-
require('./inspect_client'),
39-
require('./inspect_repl'),
40-
] :
41-
// This copy of node-inspect is built into the node executable.
4233
[
4334
require('internal/inspector/inspect_client'),
4435
require('internal/inspector/inspect_repl'),
@@ -336,9 +327,7 @@ function startInspect(argv = process.argv.slice(2),
336327
stdin = process.stdin,
337328
stdout = process.stdout) {
338329
if (argv.length < 1) {
339-
const invokedAs = runAsStandalone ?
340-
'node-inspect' :
341-
`${process.argv0} ${process.argv[1]}`;
330+
const invokedAs = `${process.argv0} ${process.argv[1]}`;
342331

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.