Skip to content

Commit

Permalink
Some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
caitlinelfring committed Aug 24, 2020
1 parent 7b2f8fe commit 696d41f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,14 @@ func (c *Config) compileIgnoreGlobs() {
}
}

func (c *Config) addIgnoreGlob(s string) {
path := s
func (c *Config) addIgnoreGlob(path string) {
if c.hasAbsolutePath {
var err error
path, err = filepath.Abs(s)
path, err = filepath.Abs(path)
if err != nil {
log.Error().
Err(err).
Str("path", s).
Str("path", path).
Msg("failed to get absolute path")
return
}
Expand All @@ -107,7 +106,9 @@ func gitIgnore() (lines []string) {

defer func() {
if err = buffer.Close(); err != nil {
log.Error().Err(err).Msg("gitignore buffer failed to close")
log.Error().
Err(err).
Msg("gitignore buffer failed to close")
}
}()

Expand Down

0 comments on commit 696d41f

Please sign in to comment.