Skip to content

Commit

Permalink
dev: change err to nil (#2971)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashamelentyev committed Jul 10, 2022
1 parent 9ebc2d5 commit ed4befe
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pkg/commands/cache.go
Expand Up @@ -73,11 +73,8 @@ func (e *Executor) executeCacheStatus(_ *cobra.Command, args []string) {
func dirSizeBytes(path string) (int64, error) {
var size int64
err := filepath.Walk(path, func(_ string, info os.FileInfo, err error) error {
if err != nil {
return err
}
if !info.IsDir() {
size += info.Size()
if err == nil && !info.IsDir() {
size = info.Size()
}
return err
})
Expand Down

0 comments on commit ed4befe

Please sign in to comment.