diff --git a/Library/Homebrew/api.rb b/Library/Homebrew/api.rb index 12d076c95f29fc..d518c30e9d42b0 100644 --- a/Library/Homebrew/api.rb +++ b/Library/Homebrew/api.rb @@ -82,7 +82,7 @@ def self.fetch_json_api_file(endpoint, target:) opoo "#{target.basename}: update failed, falling back to cached version." end - FileUtils.touch target + File.touch(target) unless skip_download JSON.parse(target.read) rescue JSON::ParserError target.unlink