Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
doc: update process.execArg example to be more useful
  • Loading branch information
JakobJingleheimer committed Apr 7, 2024
commit 749997b34b60b877fe1ca2e815c7ab2c9c0c3694
4 changes: 2 additions & 2 deletions doc/api/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1711,15 +1711,15 @@ the script name. These options are useful in order to spawn child processes with
the same execution environment as the parent.

```bash
node --harmony script.js --version
node --input-type=module --eval 'console.log("foo")' script.js --version
Comment thread
JakobJingleheimer marked this conversation as resolved.
Outdated
```

Results in `process.execArgv`:

<!-- eslint-disable semi -->

```js
Comment thread
JakobJingleheimer marked this conversation as resolved.
Outdated
['--harmony']
['--input-type=module', '--eval', 'console.log("foo")']
```

And `process.argv`:
Expand Down