You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should we deprecate and/or remove execa.shell() in favor of execa(..., { shell: true })?
The reason being shell is a misused option, which creates problems, so we should not encourage its use by providing a shortcut method.
Some of the issues with the shell option:
It is not cross-platform. While it does call cmd.exe on Windows and /bin/sh on Unix, those shells have different syntaxes. If the command uses shell-specific syntax, it won't be cross-platform. It it does not, shell is not needed.
It is slower, as it interprets the command through a shell interpreter.
There are some legitimate use cases for the shell option, but I believe 99% of the times its usage does not satisfy the following criteria:
a) shell is only useful for shell-specific features not available in JavaScript and Node.js. There are really not many of those.
b) shell is only useful when cross-platform is not a concern.
Note: I can submit a PR if approved.
The text was updated successfully, but these errors were encountered:
Should we deprecate and/or remove
execa.shell()
in favor ofexeca(..., { shell: true })
?The reason being
shell
is a misused option, which creates problems, so we should not encourage its use by providing a shortcut method.Some of the issues with the
shell
option:cmd.exe
on Windows and/bin/sh
on Unix, those shells have different syntaxes. If the command uses shell-specific syntax, it won't be cross-platform. It it does not,shell
is not needed.shell
option #182There are some legitimate use cases for the
shell
option, but I believe 99% of the times its usage does not satisfy the following criteria:a)
shell
is only useful for shell-specific features not available in JavaScript and Node.js. There are really not many of those.b)
shell
is only useful when cross-platform is not a concern.Note: I can submit a PR if approved.
The text was updated successfully, but these errors were encountered: