...
This commit is contained in:
@@ -20,9 +20,16 @@ pub mut:
|
||||
|
||||
// get_repo_path implements the GitUrlResolver interface
|
||||
pub fn get_repo_path(args GetRepoArgs) !string {
|
||||
if os.exists(args.path) {
|
||||
return args.path
|
||||
if args.path!=""{
|
||||
if os.exists(args.path) {
|
||||
return args.path
|
||||
}else{
|
||||
if args.git_url == "" {
|
||||
return error("can't resolve git repo path without url or existing path, ${args.path} does not exist.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mut gs := get(coderoot:args.git_root)!
|
||||
mut repo := gs.get_repo(
|
||||
url: args.git_url
|
||||
|
||||
@@ -116,8 +116,11 @@ pub fn (mut gitstructure GitStructure) get_repo(args_ ReposGetArgs) !&GitRepo {
|
||||
}
|
||||
|
||||
if repositories.len > 1 {
|
||||
repos := repositories.map('- ${it.account}.${it.name}').join_lines()
|
||||
return error('Found more than one repository for \n${args}\n${repos}')
|
||||
// repos := repositories.map('- ${it.account}.${it.name}').join_lines()
|
||||
$if debug {
|
||||
print_backtrace()
|
||||
}
|
||||
return error('Found more than one repository for \n${args}')
|
||||
}
|
||||
|
||||
// the pull & reset was not used, now re-inserted
|
||||
|
||||
Reference in New Issue
Block a user