Make --check
work when running from stdin.
#3896
Merged
--check
work when running from stdin.
#3896