Repository navigation
Description
I've been experiencing a persistent variant of the No TTY for interactive shell error trying to install oh-my-fish on fish v2.6.0:
≻ curl -L https://get.oh-my.fish | fish
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 194 100 194 0 0 426 0 --:--:-- --:--:-- --:--:-- 427
100 16622 100 16622 0 0 25023 0 --:--:-- --:--:-- --:--:-- 25023
Existing installation detected at /Users/patrick.bohan/.local/share/omf
Would you like to remove the existing installation? (y/N): <W> fish: No TTY for interactive shell (tcgetpgrp failed)
setpgid: Inappropriate ioctl for device
Requested ticket information:
≻ fish --version
fish, version 2.6.0
≻ echo $version
2.6.0
≻ uname -a
Darwin patrickbohanwerallyin.local 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017; root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64
≻ echo $TERM
xterm-256color
It does indeed when I run without customizations, i.e. sh -c 'env HOME=$(mktemp -d) fish'.
I'm rather new to fish -- I've mostly stuck to customizing my fish_prompt -- but I'm at a loss for what change might have done this. I'm happy to narrow this down on my own but I'm not entirely sure the best way to do that. (I tried fish --debug-level=3 but I'm not sure exactly what I might be looking for.)
I tried the alternate install and the first read succeeded but a second one failed. I got a stack trace that might (hopefully) is useful:
[patrick.bohan|~]0≻ curl -L https://get.oh-my.fish > install
fish install --path=~/.local/share/omf --config=~/.config/omf
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 194 100 194 0 0 384 0 --:--:-- --:--:-- --:--:-- 385
100 16622 100 16622 0 0 24041 0 --:--:-- --:--:-- --:--:-- 24041
Existing installation detected at /Users/patrick.bohan/.local/share/omf
Would you like to remove the existing installation? (y/N): ⏎ read> y
This will uninstall Oh My Fish and all plugins and themes from
/Users/patrick.bohan/.local/share/omf.
Are you sure you want to continue? (y/N): <E> fish: src/reader.cpp:1559: failed assertion: input_initialized
<E> fish: Backtrace:
<E> fish: 0 reader_push(wchar_t const*) + 1056
<E> fish: 1 builtin_read(parser_t&, io_streams_t&, wchar_t**) + 1482
<E> fish: 2 builtin_run(parser_t&, wchar_t const* const*, io_streams_t&) + 334
<E> fish: 3 exec_job(parser_t&, job_t*) + 3736
<E> fish: 4 parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 1204
<E> fish: 5 parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
<E> fish: 6 parse_execution_context_t::eval_node_at_offset(unsigned int, block_t const*, io_chain_t const&) + 403
<E> fish: 7 parser_t::eval_block_node(unsigned int, io_chain_t const&, block_type_t) + 140
<E> fish: 8 parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t, parse_node_tree_t) + 230
<E> fish: 9 parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t) + 134
<E> fish: 10 internal_exec_helper(parser_t&, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, unsigned int, block_type_t, io_chain_t const&) + 1017
<E> fish: 11 exec_job(parser_t&, job_t*) + 2885
<E> fish: 12 parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 1204
<E> fish: 13 parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
<E> fish: 14 parse_execution_context_t::eval_node_at_offset(unsigned int, block_t const*, io_chain_t const&) + 403
<E> fish: 15 parser_t::eval_block_node(unsigned int, io_chain_t const&, block_type_t) + 140
<E> fish: 16 parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t, parse_node_tree_t) + 230
<E> fish: 17 parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t) + 134
<E> fish: 18 internal_exec_helper(parser_t&, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, unsigned int, block_type_t, io_chain_t const&) + 1017
<E> fish: 19 exec_job(parser_t&, job_t*) + 2885
<E> fish: 20 parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 1204
<E> fish: 21 parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
<E> fish: 22 parse_execution_context_t::eval_node_at_offset(unsigned int, block_t const*, io_chain_t const&) + 403
<E> fish: 23 parser_t::eval_block_node(unsigned int, io_chain_t const&, block_type_t) + 140
<E> fish: 24 parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t, parse_node_tree_t) + 230
<E> fish: 25 parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t) + 134
<E> fish: 26 internal_exec_helper(parser_t&, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, unsigned int, block_type_t, io_chain_t const&) + 1017
<E> fish: 27 exec_job(parser_t&, job_t*) + 2885
<E> fish: 28 parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 1204
<E> fish: 29 parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
<E> fish: 30 parse_execution_context_t::run_if_statement(parse_node_t const&) + 461
<E> fish: 31 parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 529
<E> fish: 32 parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
<E> fish: 33 parse_execution_context_t::run_if_statement(parse_node_t const&) + 461
<E> fish: 34 parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 529
<E> fish: 35 parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
<E> fish: 36 parse_execution_context_t::eval_node_at_offset(unsigned int, block_t const*, io_chain_t const&) + 403
<E> fish: 37 parser_t::eval_block_node(unsigned int, io_chain_t const&, block_type_t) + 140
<E> fish: 38 parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t, parse_node_tree_t) + 230
<E> fish: 39 parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t) + 134
<E> fish: 40 internal_exec_helper(parser_t&, std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, unsigned int, block_type_t, io_chain_t const&) + 1017
<E> fish: 41 exec_job(parser_t&, job_t*) + 2885
<E> fish: 42 parse_execution_context_t::run_1_job(parse_node_t const&, block_t const*) + 1204
<E> fish: 43 parse_execution_context_t::run_job_list(parse_node_t const&, block_t const*) + 117
<E> fish: 44 parse_execution_context_t::eval_node_at_offset(unsigned int, block_t const*, io_chain_t const&) + 403
<E> fish: 45 parser_t::eval_block_node(unsigned int, io_chain_t const&, block_type_t) + 140
<E> fish: 46 parser_t::eval(std::__1::basic_string<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> > const&, io_chain_t const&, block_type_t, parse_node_tree_t) + 230
<E> fish: 47 reader_read(int, io_chain_t const&) + 1877
<E> fish: 48 main + 3118
<E> fish: 49 start + 1
<E> fish: 50 53 ??? 0x0000000000000004 0x0 + 4
fish: 'fish install --path=~/.local/sh…' terminated by signal SIGABRT (Abort)
[patrick.bohan|~]134≻
Unfortunately I haven't found any work around for this problem. I've looked at several seemingly related tickets ( #3805 , #3345 , #2980, #1844 ) but none appeared to be helpful for my situation.
Any help would be greatly appreciated.
Activity
krader1961 commentedon Jul 2, 2017
I had no problem using either installation method:
I do, however, see both failure modes when I attempt to reinstall OMF. So you can solve your immediate problem by first uninstalling OMF before installing it again:
You don't need OMF to reproduce this problem. Create a file named
read-bugcontaining this:Now type
echo yes | fish read-bug. This is probably another manifestation of problems caused by fish trying to put itself into its own process group at startup.tomsmeding commentedon Jul 8, 2017
The testcase mentioned here, with the
read-bugfile, first throws an error after commit 5809608. The testcase mentioned in #4199 first crashes on an assertion after commit 6d02bec. These are quite some commits apart.tomsmeding commentedon Jul 8, 2017
In particular, the config.fish testcase in #4199 still works in 5809608, and the tty read bug here is still present in 6d02bec.
mqudsi commentedon Sep 10, 2017
No, I think this is more about the problem with functions that try to take control of the terminal when called as part of a pipeline, à la #3952
In all cases, it still reproduces after 55b3c45, which disabled the new process group on startup code.
pcascio commentedon Sep 12, 2017
I also have this problem when trying to run this script for cleaning up my unused Homebrew formulae: https://github.com/connorworley/dotfiles/blob/master/.bin/brew-autoremove
My stack:
mqudsi commentedon Sep 15, 2017
The assertion failed issue should be tracked here: #4199
There are two distinct bugs here, though there is some correlation between the two.
tastyminerals commentedon Oct 3, 2017
Experiencing the same behaviour after installing fish and trying to install oh-my-fish via
sudo fish install --path=~/.local/share/omf --config=~/.config/omfor simply running./bin/installfrom git cloned oh-my-fish dir. Any updates?boxed commentedon Nov 11, 2017
I just ran into this same problem, also with omf. The workaround above worked fine.
mqudsi commentedon Sep 29, 2018
fwiw, fish no longer crashes on this case. Instead, the following message is printed:
Handle tcgetpgrp() zero result
Don't give up if unable to take control of terminal in non-interactiv…
Overhaul job and terminal control
Overhaul job and terminal control
Overhaul job and terminal control
Overhaul job and terminal control
9 remaining items
Overhaul job and terminal control
Overhaul job and terminal control
Overhaul job and terminal control
Overhaul job and terminal control
Overhaul job and terminal control
Overhaul job and terminal control
Overhaul job and terminal control
Overhaul job and terminal control
Fix regression for #4178 and others introduced by 364c839
Add regression tests for fish-shell#4178
Fix regression for #4178 and others introduced by 364c839