subshell
Boot an interactive subshell from node. Useful for custom command-line environments.
Usage
subshell([cwd], [env], [exit])
Spawns a subshell appropriate for your system, and wires up node's stdio to the shell. Optionally, you can also pass:
- A
cwd
string, for the directory to run your shell from. - An
env
object, to override the shell's environment variables. - An
exit
callback with the signature(err, code)
, called when the shell closes.
License
MIT. See LICENSE.md for details.