fix: do not print info in output that could be JSON or YAML format (#799)

* fix: print err msg for no credentials found to stderr
This commit is contained in:
Jeff Malnick authored and GitHub committed 2020-11-20 09:27:44 -08:00
1 parent 2badd4ecf8
commit af2d9dfe90
2 files changed
+9 -1

No files matched your search

+1 -1
View File
@@ -314,7 +314,7 @@ func (c *Command) ReadTokenFromKeyring(keyringType, tokenName string) *authtoken
token, err = zkeyring.Get("HashiCorp Boundary Auth Token", tokenName)
if err != nil {
if err == zkeyring.ErrNotFound {
c.UI.Info("No saved credential found, continuing without")
c.UI.Error("No saved credential found, continuing without")
} else {
c.UI.Error(fmt.Sprintf("Error reading auth token from keyring: %s", err))
c.UI.Warn("Token must be provided via BOUNDARY_TOKEN env var or -token flag. Reading the token can also be disabled via -keyring-type=none.")