diff --git a/pinentry/pinentry-curses.c b/pinentry/pinentry-curses.c --- a/pinentry/pinentry-curses.c +++ b/pinentry/pinentry-curses.c @@ -1406,7 +1406,7 @@ screen = newterm (tty_type, ttyfo, ttyfi); if (!screen) { - pinentry->specific_err = gpg_error (GPG_ERR_WINDOW_TOO_SMALL); + pinentry->specific_err = gpg_error (GPG_ERR_MISSING_ENVVAR); pinentry->specific_err_loc = "curses_init"; fclose (ttyfo); fclose (ttyfi);