From 0c72802757e6ba4e93bd9917bf9e3ebfc4cbcf06 Mon Sep 17 00:00:00 2001 From: Jeevankumar-S Date: Tue, 13 Jan 2026 13:24:09 +0000 Subject: [PATCH] doc: clarify process.argv[1] behavior for -e/--eval Signed-off-by: Jeevankumar-S --- doc/api/process.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/doc/api/process.md b/doc/api/process.md index a48879338b6015..26eb8ee0a7e2ea 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -832,11 +832,7 @@ added: v0.1.27 * Type: {string\[]} 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 -arguments. +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 (if a script file is provided). For no-script execution modes (e.g., -e/--eval), the second element is the first unconsumed command-line argument. The remaining elements are additional command-line arguments. For example, assuming the following script for `process-args.js`: