vscode-openshift-tools
vscode-openshift-tools copied to clipboard
Use child_process.spawn instead of child_process.spawn.exec and and redirect stdout to OpenShift channel
This better solution than increase output buffer for exec function. That also allows to see output in progress while command is executed, compare to exec where output made visible after command is finished.
Currently, we only use child_process.exec() in:
- The git import loader (and in the PR for the new combined view)
- The build scripts
I don't think this applies any more.
UPDATE: We have done some refactoring and we use exec in a few places again.
@datho7561 do we need to migrate to spawn or exec works well. If it is working as expected, we can close this.
Based off of what Denis says in the original issue, it would be a good idea to migrate to spawn from exec. We have run into issues where the buffer overflows, leading to errors being thrown. We have a work around for this, but it's better if we are able to avoid this entirely.