Fix an erroneous error condition

This code was swallowing an error incorrectly, rather than returning
it.  As a result, certain commands would fail with assertions rather
than the intended error message (like trying to config without a stack).
This commit is contained in:
Joe Duffy 2017-11-08 14:37:01 -08:00 committed by GitHub
parent 33a032b5c2
commit 73d627edca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View file

@ -51,7 +51,6 @@ func newConfigLsCmd() *cobra.Command {
if err != nil {
return errors.Wrap(err, "invalid configuration key")
}
return getConfig(stackName, key)
}

View file

@ -49,7 +49,7 @@ func explicitOrCurrent(name string, backend pulumiBackend) (tokens.QName, error)
if stackName == "" {
curStack, err := getCurrentStack()
if err != nil {
return "", nil
return "", err
}
stackName = curStack