info: fix on non-tty terminals.

References #18922.
Closes #24188.
Closes #24190.