From 9e87b6a9d6e8c2756b7d976402cd587c13373247 Mon Sep 17 00:00:00 2001 From: Nicolas Simonds Date: Mon, 1 Jan 2024 10:31:19 -0800 Subject: [PATCH] fix: log the entire post-command being run When running post-commands, log both the command and all defined args, to aid troubleshooting. chore: correct a typo that was gumming up the Go Report Card --- internal/repositories/repositories.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/repositories/repositories.go b/internal/repositories/repositories.go index 3b8daa3..391073b 100644 --- a/internal/repositories/repositories.go +++ b/internal/repositories/repositories.go @@ -24,6 +24,7 @@ import ( "log/slog" "os" "path/filepath" + "strings" "github.com/spf13/afero" @@ -129,8 +130,9 @@ func (r *Repositories) Overlay() error { if len(c.Commands) > 0 { for _, command := range c.Commands { r.logger.Info( - "executing commmand", + "executing command", slog.String("cmd", command.Cmd), + slog.String("args", strings.Join(command.Args, " ")), ) if err := r.execManager.RunCmd(command.Cmd, command.Args); err != nil { return err