Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions subcmd/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,9 @@ func (*getCmd) updateReposVersion(lockJSON *lockjson.LockJSON, reposPath pathuti
}
// Add repos to 'repos'
lockJSON.Repos = append(lockJSON.Repos, *repos)
sort.SliceStable(lockJSON.Repos, func(i, j int) bool {
return strings.ToLower(lockJSON.Repos[i].Path.FullPath()) < strings.ToLower(lockJSON.Repos[j].Path.FullPath())
})
added = true
} else {
// repos is found in lock.json
Expand All @@ -593,8 +596,12 @@ func (*getCmd) updateReposVersion(lockJSON *lockjson.LockJSON, reposPath pathuti
if !profile.ReposPath.Contains(reposPath) {
// Add repos to 'profiles[]/repos_path'
profile.ReposPath = append(profile.ReposPath, reposPath)
sort.SliceStable(profile.ReposPath, func(i, j int) bool {
return strings.ToLower(profile.ReposPath[i].FullPath()) < strings.ToLower(profile.ReposPath[j].FullPath())
})
added = true
}

return added
}

Expand Down