follow-up for issue #1512
The previous fix, while valid, still prompts for input during early options processing if stdin is a tty. It really shouldn't be doing that during early options such as --showpaths, so alter the placement of the program_state.earlyoptions flag within *main().
This commit is contained in:
+1
-1
@@ -766,7 +766,7 @@ getret(void)
|
||||
#if defined(MICRO) || defined(WIN32CON)
|
||||
getreturn("to continue");
|
||||
#else
|
||||
if (!isatty(STDIN_FILENO))
|
||||
if (!isatty(STDIN_FILENO) || program_state.early_options)
|
||||
return;
|
||||
HUPSKIP();
|
||||
xputs("\n");
|
||||
|
||||
Reference in New Issue
Block a user