Skip to content

Add CLI flag to specify output file #44

@aa-ko

Description

@aa-ko

Hi! I ran into an issue when trying to use the CLI in a script.
If the tool generates an error message while waiting on the 2FA authentication to complete, this error will be written to stdout along with the (CSV/JSON) output from the comdirect API.
In my case, the tool is called like this:
# comdirect depot position <id> -f csv > depot.csv
This sometimes results in an invalid CSV file, where the first line contains the error message.

This is why I propose the addition of a new -o / --output flag, that will always create a valid output file while still printing any log message to stdout/stderr.

My implementation of this is working fine and I'm happy open a PR with my changes after some more testing and if this is something you'd like to support :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions