Skip to content

🐛 fix(envfile): diagnose non-regular paths - #356

Merged
gaborbernat merged 1 commit into
pytest-dev:mainfrom
gaborbernat:fix/pytest-env-pipe
Nov 19, 2026
Merged

gaborbernat merged 1 commit into
pytest-dev:mainfrom
gaborbernat:fix/pytest-env-pipe

Conversation

@gaborbernat

Copy link
Copy Markdown
Collaborator

--envfile reported an existing named pipe as missing. Configured pipes were silently skipped. Both paths now report that the selected input must be a regular file. Previous behavior. Fixes #347.

File selection distinguishes missing paths from non-regular paths

_regular_env_file checks the candidate paths for a regular file in the existing search order. If none qualifies, an existing path produces a usage error. Implementation. Regular file checks.

Behavior changes

Directories and named pipes stop collection with exit status 4. Missing configured files are skipped. A missing CLI file retains its existing error.

Reported by OSS Scanner, ANT-2026-KYVO4RV4.

@gaborbernat gaborbernat added the bug Something isn't working label Nov 19, 2026
@gaborbernat
gaborbernat merged commit 688b779 into pytest-dev:main Nov 19, 2026
20 checks passed
@gaborbernat
gaborbernat deleted the fix/pytest-env-pipe branch November 23, 2026 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

An existing dotenv FIFO is reported as missing

1 participant