Skip to content

Commit

Permalink
Prevent a crash if stdin is not defined (#3609)
Browse files Browse the repository at this point in the history
  • Loading branch information
blast-hardcheese committed Apr 17, 2024
1 parent 59a295f commit 652813d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mkdocs/config/base.py
Expand Up @@ -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
Expand Down

0 comments on commit 652813d

Please sign in to comment.