Skip to content

doc: rephrase documentation for child_process.execSync() #14944

Description

@aashil

The line at the end describing about the error thrown can be worded better.

If the process times out, or has a non-zero exit code, this method will throw. The Error object will contain the entire result from child_process.spawnSync()

Should be something like:

If the process times out, or has a non-zero exit code, this method will throw an Error object which will contain the entire result from child_process.spawnSync()

https://nodejs.org/api/child_process.html#child_process_child_process_execsync_command_options

[refack adding]

If the process times out, or has a non-zero exit code, this method ***will***
throw. The [`Error`][] object will contain the entire result from
[`child_process.spawnSync()`][]

Activity

  1. added
    child_processIssues and PRs related to the child_process subsystem.
    docIssues and PRs related to Node.js documentation.
    on Aug 19, 2017
  2. refack commented on Aug 19, 2017

    @refack
    Contributor

    I'd tweak the last part as well:

    ...
    throw an [`Error`][] that will include the full result of the underlying
    [`spawnSync()`][].
    ...
    <!-- link definition in the footer -->
    [`spawnSync()`]: #child_process_child_process_execsync_command_options
  3. added
    good first issueIssues that are suitable for first-time contributors.
    on Aug 19, 2017
  4. refack commented on Aug 19, 2017

    @refack
    Contributor

    /cc @nodejs/documentation

  5. gibfahn commented on Aug 19, 2017

    @gibfahn
    Member

    Both suggested changes sound reasonable.

  6. ayazhafiz commented on Aug 20, 2017

    @ayazhafiz
    Contributor

    I'd like to pick this up!

  7. refack commented on Aug 20, 2017

    @refack
    Contributor

    @ayazhafiz yours. (marked issue as in progress)
    If you need any help feel free to contact me (Github @ mention, email, IM or IRC).
    If you haven't already it is highly recommended to take a look at the CONTRIBUTING guide.

  8. added
    wipIssues and PRs that are still a work in progress.
    and removed
    good first issueIssues that are suitable for first-time contributors.
    on Aug 20, 2017
  9. removed
    wipIssues and PRs that are still a work in progress.
    on Aug 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    child_processIssues and PRs related to the child_process subsystem.docIssues and PRs related to Node.js documentation.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions