mirror of
https://gitea.com/gitea/tea.git
synced 2026-10-26 19:11:25 +01:00
fix: address verified review findings (actions-runs-1)
Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
9 files changed
+267
-32
No files matched your search
@@ -356,6 +356,11 @@ func (a *application) selectHost(t *target, s settings.Snapshot) error {
|
||||
}
|
||||
t.Host, t.HostSource = explicit, "--host"
|
||||
}
|
||||
return a.defaultHost(t, s)
|
||||
}
|
||||
|
||||
// defaultHost picks the instance of a target that neither the repository nor --host named.
|
||||
func (a *application) defaultHost(t *target, s settings.Snapshot) error {
|
||||
if t.Host == "" {
|
||||
for _, key := range []string{"TEA_HOST", "GITEA_INSTANCE_URL"} {
|
||||
if value := a.deps.Getenv(key); value != "" {
|
||||
|
||||
Reference in new issue
Block a user