From 6afb276b3504b550461e41810283ea1ffd9ebbc7 Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Fri, 6 Jan 2023 15:13:55 -0500 Subject: [PATCH] Only show pass phrase env if env is not set --- cli/packages/util/vault.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/packages/util/vault.go b/cli/packages/util/vault.go index b42308cc4..5561f2aee 100644 --- a/cli/packages/util/vault.go +++ b/cli/packages/util/vault.go @@ -53,9 +53,10 @@ func GetKeyRing() (keyring.Keyring, 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 { 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)