fix #1383
This commit is contained in:
parent
9b6c835715
commit
987dcc5372
13 changed files with 97 additions and 13 deletions
File diff suppressed because one or more lines are too long
|
@ -5,6 +5,7 @@
|
|||
package git
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
|
@ -21,6 +22,8 @@ func OpenRepository(repoPath string) (*Repository, error) {
|
|||
repoPath, err := filepath.Abs(repoPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else if !isDir(repoPath) {
|
||||
return nil, errors.New("no such file or directory")
|
||||
}
|
||||
|
||||
return &Repository{Path: repoPath}, nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue