Skip to content

use /bin/bash over /bin/sh if it exists - #3

Closed
okdistribute wants to merge 1 commit into
AndreasMadsen:masterfrom
okdistribute:master
Closed

okdistribute wants to merge 1 commit into
AndreasMadsen:masterfrom
okdistribute:master

Conversation

@okdistribute

Copy link
Copy Markdown

/bin/bash returns more consistent kill code than /bin/sh, but /bin/bash it isn't guaranteed to exist on all systems.

@max-mapper

Copy link
Copy Markdown

-1 to using sync method here. maybe just make the string an option that can be passed in, that way the user can choose their tradeoffs?

@AndreasMadsen

Copy link
Copy Markdown
Owner

Totally agree with @maxogden

child_process.exec supports a shell option:

I node core it is implemented like this:

  if (options && options.shell) {
    file = options.shell;
  }

I think execspawn should support that option too.

@okdistribute

Copy link
Copy Markdown
Author

Sounds good

On Monday, January 4, 2016, Andreas Madsen notifications@github.com wrote:

Totally agree with @maxogden https://github.com/maxogden

child_process.exec supports a shell option
https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback
:

I node core
https://github.com/nodejs/node/blob/master/lib/child_process.js#L96L97
it is implemented like this:

if (options && options.shell) {
file = options.shell;
}

I think execspawn should support that option too.

—
Reply to this email directly or view it on GitHub
#3 (comment)
.

Karissa McKelvey
http://karissa.github.io/

@okdistribute

Copy link
Copy Markdown
Author

what would execspawn give differently than child_process.spawn then?

@AndreasMadsen

Copy link
Copy Markdown
Owner

Well the input API is child_process.exec and the output API is child_process.spawn so I don't see a problem there.

@okdistribute

Copy link
Copy Markdown
Author

ok was just curious. going to close this and hopefully the kill bug will be fixed deeper in core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants