update-license-data: use of unlink to remove existing file
This commit is contained in:
parent
0ea6245094
commit
4dcbe8790f
@ -31,7 +31,8 @@ module Homebrew
|
||||
update_license_data_args.parse
|
||||
ohai "Updating SPDX license data..."
|
||||
spdx_download_result = curl(SPDX_DATA_URL, print_stdout: false)
|
||||
SPDX_PATH.write(spdx_download_result.stdout, overwrite: true)
|
||||
SPDX_PATH.unlink if SPDX_PATH.exist?
|
||||
SPDX_PATH.write(spdx_download_result.stdout)
|
||||
return unless args.fail_if_changed?
|
||||
|
||||
system("git diff --stat --exit-code #{SPDX_PATH}")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user