Skip to content

Commit

Permalink
fix: log the entire post-command being run
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nisimond authored and retr0h committed Jan 4, 2024
1 parent f10b277 commit 9e87b6a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/repositories/repositories.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"log/slog"
"os"
"path/filepath"
"strings"

"github.com/spf13/afero"

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9e87b6a

Please sign in to comment.