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
pull/803/head
Jeff Malnick 6 years ago committed by GitHub
parent 2badd4ecf8
commit af2d9dfe90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,6 +2,14 @@
Canonical reference for changes, improvements, and bugfixes for Boundary.
## vNext
### Bug Fixes
* cli: Ensure errors print to stderr when token is not found
([Issue](https://github.com/hashicorp/boundary/issues/791))
([PR](https://github.com/hashicorp/boundary/pull/799)]
## v0.1.2
### New and Improved

@ -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.")

Loading…
Cancel
Save