fix: if public repository does not have a main branch
This commit is contained in:
parent
3d43f2127a
commit
c618d912db
1 changed files with 8 additions and 7 deletions
|
|
@ -76,13 +76,14 @@ public function load_branch()
|
||||||
$this->get_branch();
|
$this->get_branch();
|
||||||
$this->selected_branch = $this->git_branch;
|
$this->selected_branch = $this->git_branch;
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
if (!$this->branch_found && $this->git_branch == 'main') {
|
||||||
}
|
try {
|
||||||
if (!$this->branch_found && $this->git_branch == 'main') {
|
$this->git_branch = 'master';
|
||||||
try {
|
$this->get_branch();
|
||||||
$this->git_branch = 'master';
|
} catch (\Throwable $e) {
|
||||||
$this->get_branch();
|
return handleError($e, $this);
|
||||||
} catch (\Throwable $e) {
|
}
|
||||||
|
} else {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue