mirror of https://github.com/databricks/cli.git
cbf75b157d
## Changes `executor.Exec` now uses `cmd.CombinedOutput`. Previous implementation was hanging on my windows VM during `bundle deploy` on the `ReadAll(MultiReader(stdout, stderr))` line. The problem is related to the fact the MultiReader reads sequentially, and the `stdout` is the first in line. Even simple `io.ReadAll(stdout)` hangs on me, as it seems like the command that we spawn (python wheel build) waits for the error stream to be finished before closing stdout on its own side? Reading `stderr` (or `out`) in a separate go-routine fixes the deadlock, but `cmd.CombinedOutput` feels like a simpler solution. Also noticed that Exec was not removing `scriptFile` after itself, fixed that too. ## Tests Unit tests and manually |
||
---|---|---|
.. | ||
exec.go | ||
exec_test.go | ||
shell.go | ||
shell_bash.go | ||
shell_bash_test.go | ||
shell_cmd.go | ||
shell_cmd_test.go | ||
shell_sh.go | ||
shell_sh_test.go |