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 3331bdc

Browse filesBrowse files
Jeevankumar-saduh95
authored andcommitted
doc: clarify process.argv[1] behavior for -e/--eval
Signed-off-by: Jeevankumar-S <jeevenkumar2003@email.com> PR-URL: #61366 Fixes: #61363 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 94b34c3 commit 3331bdc
Copy full SHA for 3331bdc

1 file changed

+3-2Lines changed: 3 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎doc/api/process.md‎

Copy file name to clipboardExpand all lines: doc/api/process.md
+3-2Lines changed: 3 additions & 2 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -834,8 +834,8 @@ added: v0.1.27
834834
The `process.argv` property returns an array containing the command-line
835835
arguments passed when the Node.js process was launched. The first element will
836836
be [`process.execPath`][]. See `process.argv0` if access to the original value
837-
of `argv[0]` is needed. The second element will be the path to the JavaScript
838-
file being executed. The remaining elements will be any additional command-line
837+
of `argv[0]` is needed. If a [program entry point][] was provided, the second element
838+
will be the absolute path to it. The remaining elements are additional command-line
839839
arguments.
840840

841841
For example, assuming the following script for `process-args.js`:
@@ -4590,6 +4590,7 @@ cases:
45904590
[process.cpuUsage]: #processcpuusagepreviousvalue
45914591
[process_emit_warning]: #processemitwarningwarning-type-code-ctor
45924592
[process_warning]: #event-warning
4593+
[program entry point]: https://nodejs.org/api/cli.html#program-entry-point
45934594
[report documentation]: report.md
45944595
[terminal raw mode]: tty.md#readstreamsetrawmodemode
45954596
[uv_get_available_memory]: https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_available_memory

0 commit comments

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