Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

CLI does not support reading from pipes #1685

Open
lordmauve opened this issue Nov 15, 2022 · 0 comments
Open

CLI does not support reading from pipes #1685

lordmauve opened this issue Nov 15, 2022 · 0 comments

Comments

@lordmauve
Copy link
Member

I tried using pipes to preprocess input files prior to consumption by Waiter.

waiter create --json <(jsonc2json deploy/waiter/template.json) --context <(jsonc2json deploy/waiter/prod.json) --context.version 5805415c55c19322c9b8da8595c3c0bb63e09a36

This fails with the error message

Unable to load JSON from /dev/fd/63.

This appears to be due to a redundant os.path.isfile() check here in waiter.data_format.load_file(). It would be better to use the EAFP pattern and catch/suppress/reraise FileNotFoundError and IsADirectoryError from the open().

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant