Closed n-dusan closed 1 month ago
I've been looking into this and this is actually going to be really hard. The problem is that we have our yubikey prompts which don't work in combination with < and |. This is what happens:
Do you want to reuse already set up Yubikey? [y/N]: Aborted!
Standard Input Stream State: When a CLI function reads from stdin that has been redirected from a file (using <), it consumes all the input from that file. After the end of this input, stdin is considered exhausted and effectively closed from the perspective of awaiting further interactive input. This means no additional data can be read through standard input mechanisms like prompts directly within the same execution context or process flow.
I can refactor some of these commands to expect a config file, but it looks like supporting <
would take a lot of work. I removed the good first issue label since this is far from trivial sadly.
Partially addressed by merging #550, not worth fully implementing due to restrictions mentioned in the previous commit
Example:
[ ]
taf targets add-repo --path . badriver-nsn/law-rdf < custom.json --target-path ../../badriver-nsn/law-rdf
taf targets add-repo --path . badriver-nsn/law-rdf --serve latest --type rdf --serve-prefix _rdf --role rdf --target-path ../../badriver-nsn/law-rdf
[ ] Update all other commands to use the pipe code (wherever we pass in a path to a file, such as
keys-description.json
)More information in click docs and stackoverflow.