-
Notifications
You must be signed in to change notification settings - Fork 29.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lib: replace string concatenation with template #16920
Conversation
@@ -46,7 +46,7 @@ function stdioStringToArray(option) { | |||
case 'inherit': | |||
return [option, option, option, 'ipc']; | |||
default: | |||
throw new TypeError('Incorrect value of stdio option: ' + option); | |||
throw new TypeError(`Incorrect value of stdio option: ${option}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is another PR open that will be landing soon that changes this error message. It's likely safe to omit this change here and just wait for the other PR to land.
|
||
if (!ex) { | ||
ex = new Error('Command failed: ' + cmd + '\n' + stderr); | ||
ex = new Error(`Command failed: ${cmd}\n${stderr}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise here, it's not likely worth changing the string concatenations in error throws since those will be changing very soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take care of @jasnell 's comments when I land this.
@chandrams Thanks so much for your first commit 🎉. Landed as 79f805c |
PR-URL: nodejs#16920 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
PR-URL: #16920 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Franziska Hinkelmann <[email protected]>
This does not land cleanly in |
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
This is my first contribution to node. Thank you.