How to handle a subcommand which prompts for user input #1232
Unanswered
mike-lloyd03
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I trying to integrate a project of mine with
direnv
. It is a simple secrets storage tool. When the user runs:It reads from a
.renv
file in the source directory, decrypts the secrets that are specified there from the user's vault, and formats them into shell commands which can be passed tosource
.The output would look like this:
I'm trying to find a clean way to set this up for
direnv
. I've done something like this:.envrc
:$(rudric env direnv)
This would output the necessary strings for direnv to source the variables. However, the user is prompted to enter his password when this command is run. When the enter password prompt appears, the user is not able to type anything in and the command fails.
By default, the library I'm using (dialoguer) interacts on
stderr
.How can I get direnv to allow the user to input text when sourcing the
.envrc
file?Beta Was this translation helpful? Give feedback.
All reactions