aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkg/config/config.go2
-rw-r--r--pkg/portage/repository/mask.go7
2 files changed, 8 insertions, 1 deletions
diff --git a/pkg/config/config.go b/pkg/config/config.go
index cc0ce31..bdd59ad 100644
--- a/pkg/config/config.go
+++ b/pkg/config/config.go
@@ -39,7 +39,7 @@ func LogFile() string {
}
func Version() string {
- return getEnv("SOKO_VERSION", "v0.1.8")
+ return getEnv("SOKO_VERSION", "v0.1.9")
}
func Port() string {
diff --git a/pkg/portage/repository/mask.go b/pkg/portage/repository/mask.go
index 9df53de..a684211 100644
--- a/pkg/portage/repository/mask.go
+++ b/pkg/portage/repository/mask.go
@@ -68,6 +68,13 @@ func versionSpecifierToPackageAtom(versionSpecifier string) string {
// parseAuthorLine parses the first line in the package.mask file
// and returns the author name, author email and the date
func parseAuthorLine(authorLine string) (string, string, time.Time) {
+
+ if ! ( strings.Contains(authorLine, "<") && strings.Contains(authorLine, ">") ) {
+ logger.Error.Println("Error while parsing the author line in mask entry:")
+ logger.Error.Println(authorLine)
+ return "", "", time.Now()
+ }
+
author := strings.TrimSpace(strings.Split(authorLine, "<")[0])
author = strings.ReplaceAll(author, "#", "")
authorEmail := strings.TrimSpace(strings.Split(strings.Split(authorLine, "<")[1], ">")[0])