From be2063abf5867debd70d272949a6885eb728a66a Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Wed, 10 Apr 2024 00:09:50 +0200 Subject: [PATCH] daemon: improve error messages Signed-off-by: Frank Villaro-Dixon --- internal/app/cmd/daemon.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/app/cmd/daemon.go b/internal/app/cmd/daemon.go index f381b36..e56a13f 100644 --- a/internal/app/cmd/daemon.go +++ b/internal/app/cmd/daemon.go @@ -103,14 +103,14 @@ func runDaemon(ctx context.Context, configFile *string) func(cmd *cobra.Command, resp, err := runner.Declare(ctx, ls.Names()) if err != nil && connect.CodeOf(err) == connect.CodeUnimplemented { // Gitea instance is older version. skip declare step. - log.Warn("Because the Forgejo instance is an old version, skip declare labels and version.") + log.Warn("Because the Forgejo instance is an old version, skipping declaring the labels and version.") } else if err != nil { log.WithError(err).Error("fail to invoke Declare") return err } else { - log.Infof("runner: %s, with version: %s, with labels: %v, declare successfully", + log.Infof("runner: %s, with version: %s, with labels: %v, declared successfully", resp.Msg.Runner.Name, resp.Msg.Runner.Version, resp.Msg.Runner.Labels) - // if declare successfully, override the labels in the.runner file with valid labels in the config file (if specified) + // if declared successfully, override the labels in the.runner file with valid labels in the config file (if specified) reg.Labels = ls.ToStrings() if err := config.SaveRegistration(cfg.Runner.File, reg); err != nil { return fmt.Errorf("failed to save runner config: %w", err)