mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-25 10:01:30 +00:00
Fix deprecated version check
This commit is contained in:
parent
8df0aa5719
commit
f1c76c4dde
|
@ -24,10 +24,10 @@ func (n Note) Impending() bool {
|
|||
return false
|
||||
}
|
||||
versionMinor := semver.Compare(semver.MajorMinor("v"+C.Version), "v"+n.ScheduledVersion)
|
||||
if versionMinor < 0 {
|
||||
if semver.Prerelease("v"+C.Version) == "" && versionMinor > 0 {
|
||||
panic("invalid deprecated note: " + n.Name)
|
||||
}
|
||||
return versionMinor <= 1
|
||||
return versionMinor >= -1
|
||||
}
|
||||
|
||||
func (n Note) Message() string {
|
||||
|
|
Loading…
Reference in a new issue