Skip to content

Commit

Permalink
downloader: change to use errors.Is(err, os.ErrNotExist)
Browse files Browse the repository at this point in the history
Signed-off-by: Norio Nomura <norio.nomura@gmail.com>
  • Loading branch information
norio-nomura committed Aug 31, 2024
1 parent c0e6d8e commit 779a241
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/downloader/downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ func CacheEntries(opt ...Opt) (map[string]string, error) {
downloadDir := filepath.Join(o.cacheDir, "download", "by-url-sha256")
_, err := os.Stat(downloadDir)
if err != nil {
if os.IsNotExist(err) {
if errors.Is(err, os.ErrNotExist) {
return entries, nil
}
return nil, err
Expand Down

0 comments on commit 779a241

Please sign in to comment.