Skip to content

Commit

Permalink
fix: Don't join info path with root (#418)
Browse files Browse the repository at this point in the history
Closes #417
  • Loading branch information
mrexox committed Jan 23, 2023
1 parent a143747 commit d7b107c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## master (unreleased)

- fix: Don't join info path with root ([#418](https://github.com/evilmartians/lefthook/pull/418)) by @mrexox

## 1.2.7 (2023-01-10)

- fix: Make info dir when it is absent ([#414](https://github.com/evilmartians/lefthook/pull/414)) by @sato11
Expand Down
2 changes: 1 addition & 1 deletion internal/git/repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func NewRepository(fs afero.Fs) (*Repository, error) {
if err != nil {
return nil, err
}
infoPath = filepath.Join(rootPath, infoPath)
infoPath = filepath.Clean(infoPath)
if exists, _ := afero.DirExists(fs, infoPath); !exists {
err = fs.Mkdir(infoPath, infoDirMode)
if err != nil {
Expand Down

0 comments on commit d7b107c

Please sign in to comment.