Skip to content
Snippets Groups Projects
Commit 5d141f571cf0 authored by Christophe de Vienne's avatar Christophe de Vienne
Browse files

build_version_file: fix when run within tag-less cset

parent cb1c7bfe4226
No related branches found
No related tags found
No related merge requests found
Pipeline #115645 failed
...@@ -21,8 +21,8 @@ ...@@ -21,8 +21,8 @@
} }
lines = append(lines, l) lines = append(lines, l)
} }
if len(lines) != 1 { if len(lines) > 1 {
fmt.Println(string(out)) fmt.Println(string(out))
return "", errors.New("Expects a single line") return "", errors.New("Expects a single line")
} }
...@@ -25,5 +25,8 @@ ...@@ -25,5 +25,8 @@
fmt.Println(string(out)) fmt.Println(string(out))
return "", errors.New("Expects a single line") return "", errors.New("Expects a single line")
} }
if len(lines) == 1 {
return lines[0], err
}
...@@ -29,5 +32,5 @@ ...@@ -29,5 +32,5 @@
return lines[0], err return "", err
} }
func mustSysCmd(name string, arg ...string) string { func mustSysCmd(name string, arg ...string) string {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment