Skip to content

Commit

Permalink
feat(install): add took duration to install finished log
Browse files Browse the repository at this point in the history
  • Loading branch information
ekristen committed Oct 26, 2024
1 parent 1e8186c commit c043bf0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/commands/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"path/filepath"
"runtime"
"strings"
"time"

"github.com/apex/log"
"github.com/urfave/cli/v2"
Expand All @@ -16,6 +17,8 @@ import (
)

func Execute(c *cli.Context) error {
start := time.Now().UTC()

cfg, err := config.New(c.String("config"))
if err != nil {
return err
Expand Down Expand Up @@ -61,7 +64,9 @@ func Execute(c *cli.Context) error {
return err
}

log.Infof("installation complete")
elapsed := time.Since(start)

log.Infof("installation complete in %s", elapsed)

return nil
}
Expand Down

0 comments on commit c043bf0

Please sign in to comment.