Skip to content

Add CLI support for input list expansion #243

@AevaOnline

Description

@AevaOnline

Describe the bug
The omnibor CLI requires multiple input artifacts be enumerated each with their own -i option, and either crashes or errors when lists are provided on the command line.

To Reproduce
Example of currently working behavior:

aeva@EOS:~/src/omnibor-rs$ omnibor manifest create -t /home/aeva/.cargo/bin/omnibor -o /home/aeva/.adg/ -i omnibor-cli/src/cli.rs -i omnibor-cli/src/app.rs
 INFO wrote manifest 'gitoid:blob:sha256:d39cfe016d22607a7538ffb588d5ef9504cc9d354233fd898c7acca24f581a71' to '/home/aeva/.adg/gitoid_blob_sha256_b88105828ad6a42e7cb3b1813871883a7d90cce256e4d04ab37d7c9a413e985d.manifest'

Example of error when providing shell expansion list input:

aeva@EOS:~/src/omnibor-rs$ omnibor manifest create -t /home/aeva/.cargo/bin/omnibor -o /home/aeva/.adg/ -i omnibor-cli/src/{cli.rs,app.rs}
error: unexpected argument 'omnibor-cli/src/app.rs' found

Usage: omnibor manifest create [OPTIONS] --target <TARGET>

For more information, try '--help'.

Expected behavior
The manifest create command should allow for a list to be passed in via normal shell manipulation means.

This does not necessarily require CSV or other formats (I tested that above just for demonstration). It should be able to, for example, take a list of arguments after a common delimiter, such as -- or after the -i option if it is the last option on the command-line.

E.g.,

$ omnibor manifest create -t $TARGET -o $OUTPUT -i $(cat $INPUT-FILE-LIST)

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