diff -uprN e2fsprogs-1.44.4.orig/e2fsck/unix.c e2fsprogs-1.44.4/e2fsck/unix.c --- e2fsprogs-1.44.4.orig/e2fsck/unix.c 2018-08-19 04:26:58.000000000 +0200 +++ e2fsprogs-1.44.4/e2fsck/unix.c 2019-04-23 15:38:55.890507270 +0200 @@ -1439,13 +1439,6 @@ int main (int argc, char *argv[]) check_mount(ctx); - if (!(ctx->options & E2F_OPT_PREEN) && - !(ctx->options & E2F_OPT_NO) && - !(ctx->options & E2F_OPT_YES)) { - if (!ctx->interactive) - fatal_error(ctx, - _("need terminal for interactive repairs")); - } ctx->superblock = ctx->use_superblock; flags = EXT2_FLAG_SKIP_MMP; diff -uprN e2fsprogs-1.44.4.orig/e2fsck/util.c e2fsprogs-1.44.4/e2fsck/util.c --- e2fsprogs-1.44.4.orig/e2fsck/util.c 2018-08-19 04:26:58.000000000 +0200 +++ e2fsprogs-1.44.4/e2fsck/util.c 2019-04-23 15:39:27.571448855 +0200 @@ -203,6 +203,14 @@ int ask_yn(e2fsck_t ctx, const char * st const char *extra_prompt = ""; static int yes_answers; + if (!(ctx->options & E2F_OPT_PREEN) && + !(ctx->options & E2F_OPT_NO) && + !(ctx->options & E2F_OPT_YES)) { + if (!ctx->interactive) + fatal_error(ctx, + _("need terminal for interactive repairs")); + } + #ifdef HAVE_TERMIOS_H struct termios termios, tmp;