diff --git a/doc/api/process.md b/doc/api/process.md index a48879338b6015..53fc735a801cf4 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -834,8 +834,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`: @@ -4537,6 +4537,7 @@ cases: [Event Loop]: https://nodejs.org/en/learn/asynchronous-work/event-loop-timers-and-nexttick#understanding-processnexttick [LTS]: https://github.com/nodejs/Release [Permission Model]: permissions.md#permission-model +[program entry point]: https://nodejs.org/api/cli.html#program-entry-point [Readable]: stream.md#readable-streams [Signal Events]: #signal-events [Source Map]: https://tc39.es/ecma426/