Skip to content

Commit

Permalink
change path name to be absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
gesquive committed Sep 2, 2016
1 parent a6ed1b3 commit 96a5043
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion git/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ func (r Repo) Path() string {

// Name returns the name of the repo, this is just the base folder name
func (r Repo) Name() string {
return filepath.Base(r.path)
absPath := r.path
absPath, err := filepath.Abs(r.path)
if err != nil {
absPath = r.path
}
return filepath.Base(absPath)
}

// HasUserSet returns if repo has a user set
Expand Down

0 comments on commit 96a5043

Please sign in to comment.