mirror of
https://github.com/outbackdingo/ghorg.git
synced 2026-01-27 10:19:03 +00:00
Add better error message to all user clones
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
## [1.9.1] - unreleased
|
||||
## [1.9.1] - 12/11/22
|
||||
### Added
|
||||
- Ability to clone all users repos on hosted GitLab instances; thanks @mlaily
|
||||
### Changed
|
||||
|
||||
@@ -985,7 +985,6 @@ func setOutputDirName(argz []string) {
|
||||
outputDirName = strings.TrimSuffix(strings.TrimPrefix(u.Host, "www."), ".com")
|
||||
}
|
||||
|
||||
// If all-group is used set the parent folder to the name of the baseurl
|
||||
if argz[0] == "all-users" && os.Getenv("GHORG_SCM_BASE_URL") != "" {
|
||||
u, err := url.Parse(os.Getenv("GHORG_SCM_BASE_URL"))
|
||||
if err != nil {
|
||||
|
||||
@@ -36,6 +36,10 @@ func (c Gitlab) GetOrgRepos(targetOrg string) ([]Repo, error) {
|
||||
repoData := []Repo{}
|
||||
longFetch := false
|
||||
|
||||
if targetOrg == "all-users" {
|
||||
colorlog.PrintErrorAndExit("When using the 'all-users' keyword the '--clone-type=user' flag should be set")
|
||||
}
|
||||
|
||||
if targetOrg == "all-groups" {
|
||||
longFetch = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user