From d85470459f4ada7dc265c1af7666af9d8a3cf1ad Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 16 Feb 2022 21:58:09 +0100 Subject: [PATCH] fix home directory --- CHANGELOG.md | 10 ++++++++++ cmd/root.go | 2 +- internal/config.go | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91e613e..f19b329 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.5.5] - 2022-02-16 + +### Changed + +- Go version was updated from `1.16` to `1.17` + +### Fixed + +- Home directory was not being taken into account for loading configs. + ## [1.5.4] - 2022-02-16 ### Fixed diff --git a/cmd/root.go b/cmd/root.go index ae73f52..8e18712 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -61,7 +61,7 @@ func initConfig() { configPaths := []string{"."} // Home - if home, err := homedir.Dir(); err != nil { + if home, err := homedir.Dir(); err == nil { configPaths = append(configPaths, home) } diff --git a/internal/config.go b/internal/config.go index c4a8f00..4fd8dde 100644 --- a/internal/config.go +++ b/internal/config.go @@ -17,7 +17,7 @@ import ( "github.com/spf13/viper" ) -const VERSION = "1.5.4" +const VERSION = "1.5.5" type OptionMap map[string][]interface{} type Options map[string]OptionMap