Skip to content

Commit

Permalink
Fix parse
Browse files Browse the repository at this point in the history
  • Loading branch information
ersonp committed Apr 7, 2022
1 parent e4ab76e commit 8ea4490
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/visor/visorconfig/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package visorconfig
import (
"errors"
"io"
"regexp"
"strings"

"github.com/skycoin/skycoin/src/util/logging"
Expand All @@ -29,10 +28,7 @@ func Parse(log *logging.Logger, r io.Reader) (conf *V1, compat bool, err error)

// we check if the version of the visor and config are the same
if (conf.Version != "unknown") && (skyenv.BuildInfo.Version != "unknown") {
compat, err = regexp.MatchString(strings.Split(skyenv.BuildInfo.Version, "-")[0], conf.Version)
if err != nil {
return nil, compat, err
}
compat = strings.Contains(strings.Split(skyenv.BuildInfo.Version, "-")[0], strings.Split(conf.Version, "-")[0])
}
return conf, compat, nil
}

0 comments on commit 8ea4490

Please sign in to comment.