-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass in a custom json as pipe to CLI commands #526
Comments
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:
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 |
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.
The text was updated successfully, but these errors were encountered: