From 078c994159d20635b2580efdd97f9583589f7aca Mon Sep 17 00:00:00 2001 From: AlteredCoder <64792091+AlteredCoder@users.noreply.github.com> Date: Wed, 8 Sep 2021 11:58:51 +0200 Subject: [PATCH] don't install all items from hub when upgrade --force (#948) --- cmd/crowdsec-cli/utils.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cmd/crowdsec-cli/utils.go b/cmd/crowdsec-cli/utils.go index e5ebb7336..cbe6c1077 100644 --- a/cmd/crowdsec-cli/utils.go +++ b/cmd/crowdsec-cli/utils.go @@ -208,18 +208,17 @@ func UpgradeConfig(itemType string, name string, force bool) { if name != "" && name != v.Name { continue } + if !v.Installed { log.Tracef("skip %s, not installed", v.Name) - if !force { - continue - } + continue } + if !v.Downloaded { log.Warningf("%s : not downloaded, please install.", v.Name) - if !force { - continue - } + continue } + found = true if v.UpToDate { log.Infof("%s : up-to-date", v.Name)