vim-dispatch
vim-dispatch copied to clipboard
webpack hangs after completing via vim-dispatch
My rake-based tests invoke webpack (a node-based javascript compiler) as a child process. For some reason, when running my tests using Dispatch, the webpack process never exits.
This occurs even if I just invoke the webpack command directly (:Dispatch cd webpack && $(npm bin)/webpack
). vim-dispatch splits my tmux pane, runs the command, I see the compiler output, but then the node binary never exits. If I run using :! cd webpack && $(npm bin)/webpack
, it runs & exits normally.
vim-dispatch works fine for me with all other commands I've tried. Do you have any suggestions on narrowing this problem down?
Try with something other than tmux.
Hm. It works correctly when invoking from MacVim => opening a tab in iTerm.
The tmux handler is special in that it captures output directly from the pane rather than piping to tee
. If webpack behaves specially in that case, that could cause the discrepancy. You can test by changing 'shellpipe'
to disable that behavior. Try adding a space with :set shellpipe+=\
.
I think github might have stripped whitespace there - so try just appending a single space to shellpipe, so it becomes "2>&1| tee "
? It doesn't seem to help
I did manage to reproduce the problem when running tmux split-window -l 10 -d -P -t ':' '$(npm bin)/webpack'
in my shell, so I guess this is absolutely nothing to do with vim-dispatch. I'll go and pester the tmux/webpack guys for hints.