child_process: refactor normalizeSpawnArguments()#14149
Closed
Trott wants to merge 1 commit intonodejs:masterfrom
Closed
child_process: refactor normalizeSpawnArguments()#14149Trott wants to merge 1 commit intonodejs:masterfrom
Trott wants to merge 1 commit intonodejs:masterfrom
Conversation
Code is not in hot path. Refactor ternary to be more readable if/else block that mirrors analogous code elsewhere in the function. Change string concatenation to template literal.
BridgeAR
approved these changes
Jul 9, 2017
vsemozhetbyt
approved these changes
Jul 9, 2017
lpinca
approved these changes
Jul 10, 2017
targos
approved these changes
Jul 10, 2017
cjihrig
approved these changes
Jul 10, 2017
Member
Author
jasnell
approved these changes
Jul 10, 2017
refack
approved these changes
Jul 10, 2017
| if (typeof options.shell === 'string') | ||
| file = options.shell; | ||
| else | ||
| file = process.env.comspec || 'cmd.exe'; |
Contributor
There was a problem hiding this comment.
Since you touched this. I'm not sure an environment without a comspec is valid...
@nodejs/platform-windows
Member
There was a problem hiding this comment.
@refack No, it is not, at least not in the top-level environment. %COMSPEC% must always be a valid path to an executable acting as the "shell". However, the value of %COMSPEC% can be modified by users and can be overriden and/or deleted for child processes. Windows will not prevent that, even though it is not intended behavior.
Contributor
Trott
added a commit
to Trott/io.js
that referenced
this pull request
Jul 12, 2017
Code is not in hot path. Refactor ternary to be more readable if/else block that mirrors analogous code elsewhere in the function. Change string concatenation to template literal. PR-URL: nodejs#14149 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Member
Author
|
Landed in 6d090e1 |
Merged
addaleax
pushed a commit
that referenced
this pull request
Jul 18, 2017
Code is not in hot path. Refactor ternary to be more readable if/else block that mirrors analogous code elsewhere in the function. Change string concatenation to template literal. PR-URL: #14149 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Fishrock123
pushed a commit
that referenced
this pull request
Jul 19, 2017
Code is not in hot path. Refactor ternary to be more readable if/else block that mirrors analogous code elsewhere in the function. Change string concatenation to template literal. PR-URL: #14149 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
Contributor
|
Should this be backported to |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Not sure how this will be received, but it was bugging me, so I changed it for readability:
Code is not in hot path. Refactor ternary to be more readable if/else
block that mirrors analogous code elsewhere in the function. Change
string concatenation to template literal.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
child_process