Skip to content

Commit

Permalink
skip create cache dir if empty (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
philchia authored Mar 5, 2021
1 parent 7e2a1c1 commit 476d18b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,10 @@ func (c *client) setReleaseKey(namespace, releaseKey string) {

// autoCreateCacheDir autoCreateCacheDir
func (c *client) autoCreateCacheDir() error {
if c.conf.CacheDir == "" {
return nil
}

fs, err := os.Stat(c.conf.CacheDir)
if err != nil {
if os.IsNotExist(err) {
Expand Down

0 comments on commit 476d18b

Please sign in to comment.