vim-dispatch icon indicating copy to clipboard operation
vim-dispatch copied to clipboard

webpack hangs after completing via vim-dispatch

Open jdelStrother opened this issue 9 years ago • 5 comments

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?

jdelStrother avatar Apr 08 '15 10:04 jdelStrother

Try with something other than tmux.

tpope avatar Apr 08 '15 15:04 tpope

Hm. It works correctly when invoking from MacVim => opening a tab in iTerm.

jdelStrother avatar Apr 08 '15 15:04 jdelStrother

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+=\.

tpope avatar Apr 13 '15 20:04 tpope

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

jdelStrother avatar Apr 14 '15 08:04 jdelStrother

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.

jdelStrother avatar Apr 14 '15 08:04 jdelStrother