Please sign in to comment.
child_process: remove extra newline in errors
checkExecSyncError() creates error objects for execSync() and execFileSync(). If the child process created stderr output, then it is attached to the end of the error message. However, stderr can be an empty Buffer object, which always passes the truthy check, leading to an extra newline in the error message. This commit adds a length check, which will work with both strings and Buffers. PR-URL: #9343 Reviewed-By: Wyatt Preul <firstname.lastname@example.org> Reviewed-By: James M Snell <email@example.com>
- Loading branch information...
Showing with 2 additions and 2 deletions.