mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-15 01:52:42 +03:00
Merge pull request #3905 from urbit/jb/notty
vere: print error and exit if stdin is not a tty
This commit is contained in:
commit
c7579e9e2c
@ -147,6 +147,12 @@ u3_term_log_init(void)
|
||||
{
|
||||
uty_u->fid_i = 0; // stdin, yes we write to it...
|
||||
|
||||
if ( !isatty(uty_u->fid_i) ) {
|
||||
fprintf(stderr, "vere: unable to initialize terminal (not a tty)\r\n"
|
||||
" use -t to disable interactivity\r\n");
|
||||
u3_king_bail();
|
||||
}
|
||||
|
||||
uv_pipe_init(u3L, &(uty_u->pop_u), 0);
|
||||
uv_pipe_open(&(uty_u->pop_u), uty_u->fid_i);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user