-
Notifications
You must be signed in to change notification settings - Fork 71
Conversation
LGTM |
Ouch...
|
I guess the crucial part of the error is "Vim: Warning: Output is not to a terminal"; how to reproduce such a situation? |
That warning appears when Vim is on the left side of a pipe:
I'm building the latest now on OS X to see if I can reproduce the error. |
I tried this, and no problems on OS X 10.10.3 |
I tried this too and had no issues. I also tried redirecting the output and didn't see the error either. |
That's good news, I suppose. But how to fix the build? 😬 |
This is caused by the lack of tty. To reproduce it you can either run
Or below bash command:
To work around this, you can use this patch. diff --git a/Formula/neovim.rb b/Formula/neovim.rb
index 665378a..f3da1f5 100644
--- a/Formula/neovim.rb
+++ b/Formula/neovim.rb
@@ -76,7 +75,7 @@ class Neovim < Formula
test do
(testpath/"test.txt").write("Hello World from Vim!!")
- system bin/"nvim", "-u", "NONE", "+s/Vim/Neovim/g", "+wq", "test.txt"
+ system "script", "-q" ,"/dev/null", bin/"nvim", "-u", "NONE", "+s/Vim/Neovim/g", "+wq", "test.txt"
assert_equal "Hello World from Neovim!!", File.read("test.txt").strip
end
end
FWIW, it would be better that neovim could support environment without tty rather than using the workaround. |
Sorry I think I overcomplicate the problem. In fact, it can be reproduced by redirecting $ nvim -u NONE +s/Vim/Neovim/g +wq test.txt >output.txt 2>&1
[1] 76906 abort nvim -u NONE +s/Vim/Neovim/g +wq test.txt > output.txt 2>&1
$ cat output.txt
Vim: Warning: Output is not to a terminal
Assertion failed: (handle->type == UV_TCP || handle->type == UV_TTY || handle->type == UV_NAMED_PIPE), function uv___stream_fd, file /tmp/neovim20150516-37778-1oyjbqk/.deps/build/src/libuv/src/unix/stream.c, line 1528. So it should be considered as a bug. |
Created neovim/neovim#2671, thanks for figuring this out @xu-cheng! |
Okay, finally found a way to avoid the problem by stumbling upon neovim/neovim#3202. Updated to the latest LibUV 1.7.2. |
LGTM |
Make sure to send a PR to the main repo too, when you get the chance. |
neovim/neovim#2604