Skip to content

Commit 7137350

Browse files
authored
Merge pull request #52 from kwilliams312/issue50_dircheck
fix for issue #50
2 parents 9c712f7 + 425352a commit 7137350

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

autotag.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"errors"
66
"fmt"
77
"log"
8+
"os"
89
"path/filepath"
910
"sort"
1011
"strconv"
@@ -148,6 +149,10 @@ func NewRepo(cfg GitRepoConfig) (*GitRepo, error) {
148149
return nil, err
149150
}
150151

152+
if _, err := os.Stat(gitDirPath); os.IsNotExist(err) {
153+
return nil, err
154+
}
155+
151156
log.Println("Opening repo at", gitDirPath)
152157
repo, err := git.OpenRepository(gitDirPath)
153158
if err != nil {

0 commit comments

Comments
 (0)