Skip to content

Commit 8e77904

Browse files
Walzpierrelalanne
authored andcommitted
fix(provider): Use 'os.PathSeparator' to correctly split path on Windows
1 parent 625ae70 commit 8e77904

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

provider/generic_repository.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func (p *GenericProvider) Gather(user string) ([]GitRepository, error) {
6868
}
6969

7070
// Split the repository URL or patch and use the last part
71-
parts := strings.Split(path, "/")
71+
parts := strings.Split(path, string(os.PathSeparator))
7272
if parts[len(parts)-1] == ".git" && len(parts) > 2 {
7373
// As "path/to/project/.git" is valid, we use the second to last part when the last part is ".git"
7474
name = parts[len(parts)-2]

0 commit comments

Comments
 (0)