From 9a71736522716b14acbf05eff124e6e348d7230e Mon Sep 17 00:00:00 2001 From: bitxeno <137328844+bitxeno@users.noreply.github.com> Date: Fri, 13 Sep 2024 14:07:32 +0800 Subject: [PATCH] fix: extend the installation timeout limit. --- internal/manager/install_manager.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/manager/install_manager.go b/internal/manager/install_manager.go index d4b22db..cffd6a4 100644 --- a/internal/manager/install_manager.go +++ b/internal/manager/install_manager.go @@ -65,7 +65,7 @@ func (t *InstallManager) Start(ctx context.Context, udid, account, password, ipa t.outputStderr.Reset() // set execute timeout 5 miniutes - timeout := 5 * time.Minute + timeout := 10 * time.Minute ctx, cancel := context.WithTimeout(ctx, timeout) t.cancel = cancel @@ -89,8 +89,9 @@ func (t *InstallManager) Start(ctx context.Context, udid, account, password, ipa if err := cmd.Start(); err != nil { if err == context.DeadlineExceeded { _ = cmd.Process.Kill() + log.Err(err).Msgf("Installation exceeded %d-minute timeout limit. %s", int(timeout.Minutes()), t.ErrorLog()) + err = fmt.Errorf("Installation exceeded %d-minute timeout limit. %s", int(timeout.Minutes()), err.Error()) } - log.Err(err).Msg("Error start installation script.") return err }