Skip to content

Feature: Support shell test contexts (e.g. bats-core) #19

@taqtiqa-mark

Description

@taqtiqa-mark

Thanks for all your effort in making enquirer, and for making it open source.

We've struggled to test a bash script that uses enquirer.
Our test framework is bats-core.

There may be other issues in that context.
However, we believe an initial stumbling block is that neither of the following work:

enquirer input --message "Project parent folder?" --default "$(pwd)" <<</tmp
enquirer input --message "Project parent folder?" --default "$(pwd)" < <(echo /tmp)

This looks like enquirer recognized an input device:

$ enquirer input --default "$(pwd)" --message "Project parent folder?" <(echo /tmp)
error: Found argument '/dev/fd/63' which wasn't expected, or isn't valid in this context

USAGE:
    enquirer input [OPTIONS] --message <MESSAGE>

For more information try --help

Appreciate any hints or tips.

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