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 eefc6aa

Browse filesBrowse files
FeelyChaucodebytere
authored andcommitted
doc: document the error when cwd not exists in child_process.spawn
If the option cwd does not exist, the error ENOENT is the same as the error emitted when the command does not exist, it's confusing. PR-URL: #34505 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
1 parent 6349b1d commit eefc6aa
Copy full SHA for eefc6aa

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Open diff view settings
Collapse file

‎doc/api/child_process.md‎

Copy file name to clipboardExpand all lines: doc/api/child_process.md
+4-1Lines changed: 4 additions & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,10 @@ const defaults = {
469469
```
470470

471471
Use `cwd` to specify the working directory from which the process is spawned.
472-
If not given, the default is to inherit the current working directory.
472+
If not given, the default is to inherit the current working directory. If given,
473+
but the path does not exist, the child process emits an `ENOENT` error
474+
and exits immediately. `ENOENT` is also emitted when the command
475+
does not exist.
473476

474477
Use `env` to specify environment variables that will be visible to the new
475478
process, the default is [`process.env`][].

0 commit comments

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