Skip to content

Commit eec45e8

Browse files
arschlesAaron Schlesinger
authored andcommitted
fix(build.go): not attempting to log the directory if there is none specified
1 parent cda8384 commit eec45e8

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

pkg/gitreceive/build.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ func mcCmd(configDir string, args ...string) *exec.Cmd {
4545

4646
// run prints the command it will execute to the debug log, then runs it and returns the result of run
4747
func run(cmd *exec.Cmd) error {
48-
log.Debug("running [%s] in directory %s", strings.Join(cmd.Args, " "), cmd.Dir)
48+
cmdStr := strings.Join(cmd.Args, " ")
49+
if cmd.Dir != "" {
50+
log.Debug("running [%s] in directory %s", cmdStr, cmd.Dir)
51+
} else {
52+
log.Debug("runninng [%s]", cmdStr)
53+
}
4954
return cmd.Run()
5055
}
5156

0 commit comments

Comments
 (0)