Skip to content
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

child_process: simplify argument handling #25194

Merged
merged 1 commit into from Dec 28, 2018

Conversation

@cjihrig
Copy link
Contributor

commented Dec 23, 2018

This commit simplifies the calling of normalizeSpawnArguments() and normalizeExecArguments(). Specifically, this commit replaces apply() and the use of arguments with a normal function call.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
function execSync(command /* , options */) {
var opts = normalizeExecArgs.apply(null, arguments);
function execSync(command, options) {
var opts = normalizeExecArgs(command, options, null);

This comment has been minimized.

Copy link
@BridgeAR

BridgeAR Dec 24, 2018

Member

I suggest to remove null as it's not required but by passing it through explicitly it somewhat seems like that.

This comment has been minimized.

Copy link
@cjihrig

cjihrig Dec 24, 2018

Author Contributor

Last I heard, it was still better to pass the exact number of expected arguments. If that has changed, I'm happy to remove the optional parameter.

lib/child_process.js Outdated Show resolved Hide resolved
@lpinca
lpinca approved these changes Dec 24, 2018

@cjihrig cjihrig force-pushed the cjihrig:args branch from c2ba62c to 99966c3 Dec 28, 2018

child_process: simplify argument handling
This commit simplifies the calling of normalizeSpawnArguments()
and normalizeExecArguments(). Specifically, this commit replaces
apply() and the use of arguments with a normal function call.

PR-URL: #25194
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>

@cjihrig cjihrig force-pushed the cjihrig:args branch from 99966c3 to acb49dc Dec 28, 2018

@cjihrig

This comment has been minimized.

Copy link
Contributor Author

commented Dec 28, 2018

@cjihrig cjihrig merged commit acb49dc into nodejs:master Dec 28, 2018

1 of 2 checks passed

Travis CI - Pull Request Build Errored
Details
Travis CI - Branch Build Passed
Details

@cjihrig cjihrig deleted the cjihrig:args branch Dec 28, 2018

targos added a commit that referenced this pull request Jan 1, 2019
child_process: simplify argument handling
This commit simplifies the calling of normalizeSpawnArguments()
and normalizeExecArguments(). Specifically, this commit replaces
apply() and the use of arguments with a normal function call.

PR-URL: #25194
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
refack added a commit to refack/node that referenced this pull request Jan 14, 2019
child_process: simplify argument handling
This commit simplifies the calling of normalizeSpawnArguments()
and normalizeExecArguments(). Specifically, this commit replaces
apply() and the use of arguments with a normal function call.

PR-URL: nodejs#25194
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BridgeAR BridgeAR referenced this pull request Jan 16, 2019
@MylesBorins MylesBorins referenced this pull request Jan 24, 2019
BethGriggs added a commit that referenced this pull request Apr 17, 2019
child_process: simplify argument handling
This commit simplifies the calling of normalizeSpawnArguments()
and normalizeExecArguments(). Specifically, this commit replaces
apply() and the use of arguments with a normal function call.

PR-URL: #25194
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
BethGriggs added a commit that referenced this pull request Apr 28, 2019
child_process: simplify argument handling
This commit simplifies the calling of normalizeSpawnArguments()
and normalizeExecArguments(). Specifically, this commit replaces
apply() and the use of arguments with a normal function call.

PR-URL: #25194
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BethGriggs BethGriggs referenced this pull request May 1, 2019
BethGriggs added a commit that referenced this pull request May 10, 2019
child_process: simplify argument handling
This commit simplifies the calling of normalizeSpawnArguments()
and normalizeExecArguments(). Specifically, this commit replaces
apply() and the use of arguments with a normal function call.

PR-URL: #25194
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins added a commit that referenced this pull request May 16, 2019
child_process: simplify argument handling
This commit simplifies the calling of normalizeSpawnArguments()
and normalizeExecArguments(). Specifically, this commit replaces
apply() and the use of arguments with a normal function call.

PR-URL: #25194
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.