Skip to content

Commit cd6f197

Browse files
authored
Merge pull request #160 from mattn/fix-indented-comment
Skip indented comment lines in Procfile
2 parents d2dc744 + 203d0a6 commit cd6f197

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,13 @@ func readProcfile(cfg *config) error {
148148
index := 0
149149
for _, line := range strings.Split(string(content), "\n") {
150150
tokens := strings.SplitN(line, ":", 2)
151-
if len(tokens) != 2 || len(tokens[0]) == 0 || tokens[0][0] == '#' {
151+
if len(tokens) != 2 {
152152
continue
153153
}
154154
k, v := strings.TrimSpace(tokens[0]), strings.TrimSpace(tokens[1])
155+
if len(k) == 0 || k[0] == '#' {
156+
continue
157+
}
155158
if runtime.GOOS == "windows" {
156159
v = re.ReplaceAllStringFunc(v, func(s string) string {
157160
return "%" + s[1:] + "%"

0 commit comments

Comments
 (0)