fix: if public repository does not have a main branch
This commit is contained in:
parent
3d43f2127a
commit
c618d912db
@ -76,13 +76,14 @@ public function load_branch()
|
||||
$this->get_branch();
|
||||
$this->selected_branch = $this->git_branch;
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
if (!$this->branch_found && $this->git_branch == 'main') {
|
||||
try {
|
||||
$this->git_branch = 'master';
|
||||
$this->get_branch();
|
||||
} catch (\Throwable $e) {
|
||||
if (!$this->branch_found && $this->git_branch == 'main') {
|
||||
try {
|
||||
$this->git_branch = 'master';
|
||||
$this->get_branch();
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
} else {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user