From d5fbe24ff99dae3dd501381739b4fa70543b31fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 May 2023 01:20:30 +0400 Subject: [PATCH] chore(deps): Bump github.com/urfave/cli/v2 from 2.25.4 to 2.25.5 (#59) --- go.mod | 2 +- go.sum | 4 ++-- vendor/github.com/urfave/cli/v2/flag_bool.go | 7 ++++++- vendor/modules.txt | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index c24e8d6..18a2855 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/savioxavier/termlink v1.2.1 github.com/shopspring/decimal v1.3.1 github.com/stretchr/testify v1.8.4 - github.com/urfave/cli/v2 v2.25.4 + github.com/urfave/cli/v2 v2.25.5 ) require ( diff --git a/go.sum b/go.sum index 44183f5..75ce96c 100644 --- a/go.sum +++ b/go.sum @@ -58,8 +58,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/urfave/cli/v2 v2.25.4 h1:HyYwPrTO3im9rYhUff/ZNs78eolxt0nJ4LN+9yJKSH4= -github.com/urfave/cli/v2 v2.25.4/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= +github.com/urfave/cli/v2 v2.25.5 h1:d0NIAyhh5shGscroL7ek/Ya9QYQE0KNabJgiUinIQkc= +github.com/urfave/cli/v2 v2.25.5/go.mod h1:GHupkWPMM0M/sj1a2b4wUrWBPzazNrIjouW6fmdJLxc= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= diff --git a/vendor/github.com/urfave/cli/v2/flag_bool.go b/vendor/github.com/urfave/cli/v2/flag_bool.go index f64d1cd..369d18b 100644 --- a/vendor/github.com/urfave/cli/v2/flag_bool.go +++ b/vendor/github.com/urfave/cli/v2/flag_bool.go @@ -52,7 +52,7 @@ func (b *boolValue) String() string { func (b *boolValue) IsBoolFlag() bool { return true } func (b *boolValue) Count() int { - if b.count != nil { + if b.count != nil && *b.count > 0 { return *b.count } return 0 @@ -130,6 +130,11 @@ func (f *BoolFlag) Apply(set *flag.FlagSet) error { if count == nil { count = new(int) } + + // since count will be incremented for each alias as well + // subtract number of aliases from overall count + *count -= len(f.Aliases) + if dest == nil { dest = new(bool) } diff --git a/vendor/modules.txt b/vendor/modules.txt index 8927acc..13e2d79 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -68,7 +68,7 @@ github.com/sirupsen/logrus ## explicit; go 1.20 github.com/stretchr/testify/assert github.com/stretchr/testify/require -# github.com/urfave/cli/v2 v2.25.4 +# github.com/urfave/cli/v2 v2.25.5 ## explicit; go 1.18 github.com/urfave/cli/v2 # github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673