Fix underlying reader not a terminal issues
#25102
Merged
underlying reader not a terminal issues
#25102