doc: clarify process.argv[1] behavior for -e/--eval

Signed-off-by: Jeevankumar-S <jeevenkumar2003@email.com>
PR-URL: https://github.com/nodejs/node/pull/61366
Fixes: https://github.com/nodejs/node/issues/61363
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Jeevankumar S authored and Antoine du Hamel committed 2026-02-24 08:38:59 +01:00
1 parent d3151df4b3
commit 4b73bf5bc8
1 file changed
+3 -2
+3 -2
View File
@@ -917,8 +917,8 @@ added: v0.1.27
The `process.argv` property returns an array containing the command-line
arguments passed when the Node.js process was launched. The first element will
be [`process.execPath`][]. See `process.argv0` if access to the original value
of `argv[0]` is needed. The second element will be the path to the JavaScript
file being executed. The remaining elements will be any additional command-line
of `argv[0]` is needed. If a [program entry point][] was provided, the second element
will be the absolute path to it. The remaining elements are additional command-line
arguments.
For example, assuming the following script for `process-args.js`:
@@ -4631,6 +4631,7 @@ cases:
[process.cpuUsage]: #processcpuusagepreviousvalue
[process_emit_warning]: #processemitwarningwarning-type-code-ctor
[process_warning]: #event-warning
[program entry point]: https://nodejs.org/api/cli.html#program-entry-point
[report documentation]: report.md
[terminal raw mode]: tty.md#readstreamsetrawmodemode
[uv_get_available_memory]: https://docs.libuv.org/en/v1.x/misc.html#c.uv_get_available_memory