mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 09:58:31 +07:00
Prevent a crash if stdin is not defined (#3609)
This commit is contained in:
@@ -362,7 +362,7 @@ def load_config(
|
||||
from mkdocs.config.defaults import MkDocsConfig
|
||||
|
||||
if config_file_path is None:
|
||||
if fd is not sys.stdin.buffer:
|
||||
if sys.stdin and fd is not sys.stdin.buffer:
|
||||
config_file_path = getattr(fd, 'name', None)
|
||||
cfg = MkDocsConfig(config_file_path=config_file_path)
|
||||
# load the config file
|
||||
|
||||
Reference in New Issue
Block a user