It's probably time to write a common interface for executing underlying processes. Right now in the codebase, we have a mix of shell.exec, child_process.spawn and child_process.spawnSync - which take different arguments and return different types.
Unifying them will help clean up the codebase and help us track down on commands that act a little bit differently (holding on to output and spitting it out until the very end but unintentionally)
It even might make the CommandStringBuilder obsolete - part of the motivation around that concept was to make building the "args" array easier while still returning a string of the full command. Doesn't necessarily have to happen at the same time, but should be considered
It's probably time to write a common interface for executing underlying processes. Right now in the codebase, we have a mix of
shell.exec
,child_process.spawn
andchild_process.spawnSync
- which take different arguments and return different types.Unifying them will help clean up the codebase and help us track down on commands that act a little bit differently (holding on to output and spitting it out until the very end but unintentionally)
It even might make the
CommandStringBuilder
obsolete - part of the motivation around that concept was to make building the "args" array easier while still returning a string of the full command. Doesn't necessarily have to happen at the same time, but should be considered