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
Merged

Conversation

cjihrig
Copy link
Contributor

@cjihrig cjihrig 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

@nodejs-github-bot nodejs-github-bot added the child_process Issues and PRs related to the child_process subsystem. label Dec 23, 2018
function execSync(command /* , options */) {
var opts = normalizeExecArgs.apply(null, arguments);
function execSync(command, options) {
var opts = normalizeExecArgs(command, options, null);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
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 <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@cjihrig
Copy link
Contributor Author

cjihrig commented Dec 28, 2018

@cjihrig cjihrig merged commit acb49dc into nodejs:master Dec 28, 2018
@cjihrig cjihrig deleted the args branch December 28, 2018 17:59
targos pushed a commit that referenced this pull request Jan 1, 2019
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 <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
refack pushed a commit to refack/node that referenced this pull request Jan 14, 2019
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 <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@BridgeAR BridgeAR mentioned this pull request Jan 16, 2019
@MylesBorins MylesBorins mentioned this pull request Jan 24, 2019
BethGriggs pushed a commit that referenced this pull request Apr 17, 2019
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 <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
BethGriggs pushed a commit that referenced this pull request Apr 28, 2019
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 <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@BethGriggs BethGriggs mentioned this pull request May 1, 2019
BethGriggs pushed a commit that referenced this pull request May 10, 2019
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 <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
MylesBorins pushed a commit that referenced this pull request May 16, 2019
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 <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
child_process Issues and PRs related to the child_process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants