Skip to content

fix(main): support character devices in _is_file_or_fifo - #740

Open
voidstackloop wants to merge 2 commits into
theskumar:mainfrom
voidstackloop:fix/support-character-devices
Open

voidstackloop wants to merge 2 commits into
theskumar:mainfrom
voidstackloop:fix/support-character-devices

Conversation

@voidstackloop

Copy link
Copy Markdown

Description

In _is_file_or_fifo, paths were validated only using os.path.isfile(path) and stat.S_ISFIFO(st.st_mode). This caused character devices such as os.devnull and /dev/stdin to be rejected as missing/non-file paths when passed to load_dotenv or dotenv_values.

This change expands _is_file_or_fifo to accept stat.S_ISCHR(st.st_mode) so that character special devices can be loaded cleanly.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant