0
0
mirror of https://github.com/thegeeklab/git-sv.git synced 2024-11-25 07:30:38 +00:00

fix: use filepath.Join to append path and file on validate-commit-message command

This commit is contained in:
Beatriz Vieira 2021-02-14 20:36:07 -03:00
parent e67ae6c859
commit 221d7cd8a7

View File

@ -5,6 +5,7 @@ import (
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"os" "os"
"path/filepath"
"sort" "sort"
"strings" "strings"
"sv4git/sv" "sv4git/sv"
@ -375,7 +376,7 @@ func validateCommitMessageHandler(git sv.Git, messageProcessor sv.MessageProcess
return nil 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) commitMessage, err := readFile(filepath)
if err != nil { if err != nil {