From c043bf077d2d126835bc4f24012fe1c2650cd969 Mon Sep 17 00:00:00 2001 From: Erik Kristensen Date: Sat, 26 Oct 2024 09:37:43 -0600 Subject: [PATCH] feat(install): add took duration to install finished log --- pkg/commands/install/install.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/commands/install/install.go b/pkg/commands/install/install.go index 8c8c31d..0256ca1 100644 --- a/pkg/commands/install/install.go +++ b/pkg/commands/install/install.go @@ -6,6 +6,7 @@ import ( "path/filepath" "runtime" "strings" + "time" "github.com/apex/log" "github.com/urfave/cli/v2" @@ -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 @@ -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 }