mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 21:27:31 +00:00
Only show pass phrase env if env is not set
This commit is contained in:
@@ -53,9 +53,10 @@ func GetKeyRing() (keyring.Keyring, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func fileKeyringPassphrasePrompt(prompt string) (string, error) {
|
func fileKeyringPassphrasePrompt(prompt string) (string, error) {
|
||||||
fmt.Println("You may set the `INFISICAL_VAULT_FILE_PASSPHRASE` environment variable to avoid typing password")
|
|
||||||
if password, ok := os.LookupEnv("INFISICAL_VAULT_FILE_PASSPHRASE"); ok {
|
if password, ok := os.LookupEnv("INFISICAL_VAULT_FILE_PASSPHRASE"); ok {
|
||||||
return password, nil
|
return password, nil
|
||||||
|
} else {
|
||||||
|
fmt.Println("You may set the `INFISICAL_VAULT_FILE_PASSPHRASE` environment variable to avoid typing password")
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Fprintf(os.Stderr, "%s:", prompt)
|
fmt.Fprintf(os.Stderr, "%s:", prompt)
|
||||||
|
|||||||
Reference in New Issue
Block a user