|
@@ -19,6 +19,8 @@ import (
|
|
|
"github.com/Jguer/yay/v12/pkg/text"
|
|
|
)
|
|
|
|
|
|
+const defaultTimeout = 15 * time.Second
|
|
|
+
|
|
|
type Store interface {
|
|
|
// ToUpgrade returns true if the package needs to be updated.
|
|
|
ToUpgrade(ctx context.Context, pkgName string) bool
|
|
@@ -82,7 +84,7 @@ func (v *InfoStore) getCommit(ctx context.Context, url, branch string, protocols
|
|
|
if len(protocols) > 0 {
|
|
|
protocol := protocols[len(protocols)-1]
|
|
|
|
|
|
- ctxTimeout, cancel := context.WithTimeout(ctx, 10*time.Second)
|
|
|
+ ctxTimeout, cancel := context.WithTimeout(ctx, defaultTimeout)
|
|
|
defer cancel()
|
|
|
|
|
|
cmd := v.CmdBuilder.BuildGitCmd(ctxTimeout, "", "ls-remote", protocol+"://"+url, branch)
|