From da2a426ec83bbe637040b9981bff68852ece8dc0 Mon Sep 17 00:00:00 2001 From: Lionell Date: Tue, 30 Jun 2020 15:18:10 +0800 Subject: [PATCH] update-license-data: use curl_download instead of curl --- Library/Homebrew/dev-cmd/update-license-data.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/dev-cmd/update-license-data.rb b/Library/Homebrew/dev-cmd/update-license-data.rb index 76c1397054..22e73db9a8 100644 --- a/Library/Homebrew/dev-cmd/update-license-data.rb +++ b/Library/Homebrew/dev-cmd/update-license-data.rb @@ -30,9 +30,8 @@ module Homebrew def update_license_data update_license_data_args.parse ohai "Updating SPDX license data..." - spdx_download_result = curl(SPDX_DATA_URL, print_stdout: false) - SPDX_PATH.unlink if SPDX_PATH.exist? - SPDX_PATH.write(spdx_download_result.stdout) + curl_download(SPDX_DATA_URL, to: SPDX_PATH) + return unless args.fail_if_changed? system("git diff --stat --exit-code #{SPDX_PATH}")