Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yamale command line treats pipes as directories #254

Open
ajuniper opened this issue Oct 31, 2024 · 0 comments
Open

Yamale command line treats pipes as directories #254

ajuniper opened this issue Oct 31, 2024 · 0 comments

Comments

@ajuniper
Copy link

If I use a shell process substitution like this:

yamale schema.yaml <( process_which_outputs_yaml_to_validate )

or

command pipeline | yamale schema.yaml /dev/stdin

then validation fails because yamale receives the PATH argument as e.g. /dev/fd/63 which fails the os.path.isfile test at command_line.py line 103, and is therefore treated as a directory.

Switching line 103 to be if not os.path.isdir(root): means it behaves correctly.

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

No branches or pull requests

1 participant