ghostopened on Jul 2, 2017 · GitHub

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.

Read the original on github.com ↗