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

CLI does not support reading from pipes #1685

@lordmauve

Description

@lordmauve

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().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions