Merge branch 'maximbaz-fix-timeupdate-param-usage' into dev

This commit is contained in:
Jguer 2017-06-23 09:17:16 +01:00
commit 144b483be3
2 changed files with 2 additions and 2 deletions

View file

@ -167,7 +167,7 @@ func Upgrade(flags []string) error {
if _, ok := foreign[res.Name]; ok {
// Leaving this here for now, warn about downgrades later
if (!config.YayConf.TimeUpdate && (int64(res.LastModified) > foreign[res.Name].BuildDate().Unix())) ||
if (config.YayConf.TimeUpdate && (int64(res.LastModified) > foreign[res.Name].BuildDate().Unix())) ||
alpm.VerCmp(foreign[res.Name].Version(), res.Version) < 0 {
buffer.WriteString(fmt.Sprintf("\x1b[1m\x1b[32m==>\x1b[33;1m %s: \x1b[0m%s \x1b[33;1m-> \x1b[0m%s\n",
res.Name, foreign[res.Name].Version(), res.Version))

View file

@ -38,7 +38,7 @@ type Configuration struct {
SearchMode int `json:"-"`
SortMode int `json:"sortmode"`
TarBin string `json:"tarbin"`
TimeUpdate bool `json:"versionupdate"`
TimeUpdate bool `json:"timeupdate"`
}
// YayConf holds the current config values for yay.