From 221d7cd8a7c36cff2661fcdfb1ccce75d270b903 Mon Sep 17 00:00:00 2001 From: Beatriz Vieira Date: Sun, 14 Feb 2021 20:36:07 -0300 Subject: [PATCH] fix: use filepath.Join to append path and file on validate-commit-message command --- cmd/git-sv/handlers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/git-sv/handlers.go b/cmd/git-sv/handlers.go index 6f4a1f0..206f194 100644 --- a/cmd/git-sv/handlers.go +++ b/cmd/git-sv/handlers.go @@ -5,6 +5,7 @@ import ( "fmt" "io/ioutil" "os" + "path/filepath" "sort" "strings" "sv4git/sv" @@ -375,7 +376,7 @@ func validateCommitMessageHandler(git sv.Git, messageProcessor sv.MessageProcess return nil } - filepath := fmt.Sprintf("%s/%s", c.String("path"), c.String("file")) + filepath := filepath.Join(c.String("path"), c.String("file")) commitMessage, err := readFile(filepath) if err != nil {