From ce5f14db5d66c22aa51c4834fc4a9a6bb1ace542 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Wed, 31 Mar 2021 00:13:49 -0500 Subject: [PATCH] Fix access token validation The access token was not be validated when there were additional validations errors with the named colors --- cmd/config.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/config.go b/cmd/config.go index 32a1a7d..4dce1a7 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -42,8 +42,9 @@ func GetConfig() *Config { // Validate configuration struct func (c *Config) Validate() error { var err error + if c.AccessToken == "" { - err = errors.New("access_token is not set") + return errors.New("access_token is not set") } if err = c.validateColors(); err != nil {