Skip to content

Commit

Permalink
Only show pass phrase env if env is not set
Browse files Browse the repository at this point in the history
  • Loading branch information
maidul98 committed Jan 6, 2023
1 parent cb60151 commit 6afb276
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/packages/util/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6afb276

Please sign in to comment.