diff --git a/Library/Homebrew/dev-cmd/update-license-data.rb b/Library/Homebrew/dev-cmd/update-license-data.rb index 952a46ee27..456a7b38ec 100644 --- a/Library/Homebrew/dev-cmd/update-license-data.rb +++ b/Library/Homebrew/dev-cmd/update-license-data.rb @@ -16,8 +16,8 @@ module Homebrew Update SPDX license data in the Homebrew repository. EOS - switch "--fail-if-changed", - description: "Return a failing status code if current license data's version is different from " \ + switch "--fail-if-not-changed", + description: "Return a failing status code if current license data's version is the same as " \ "the upstream. This can be used to notify CI when the SPDX license data is out of date." switch "--commit", description: "Commit changes to the SPDX license data." @@ -33,7 +33,7 @@ module Homebrew data_url = "https://raw.githubusercontent.com/spdx/license-list-data/#{latest_tag}/json/licenses.json" curl_download(data_url, to: SPDX_PATH, partial: false) - Homebrew.failed = !system("git", "diff", "--stat", "--exit-code", SPDX_PATH) if args.fail_if_changed? + Homebrew.failed = system("git", "diff", "--stat", "--exit-code", SPDX_PATH) if args.fail_if_not_changed? return unless args.commit? diff --git a/docs/Manpage.md b/docs/Manpage.md index a41eb26a2f..192e877410 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -1052,8 +1052,8 @@ directory. Update SPDX license data in the Homebrew repository. -* `--fail-if-changed`: - Return a failing status code if current license data's version is different from the upstream. This can be used to notify CI when the SPDX license data is out of date. +* `--fail-if-not-changed`: + Return a failing status code if current license data's version is the same as the upstream. This can be used to notify CI when the SPDX license data is out of date. * `--commit`: Commit changes to the SPDX license data. diff --git a/manpages/brew.1 b/manpages/brew.1 index 25e5ce2cc4..d0e45e813a 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -1361,8 +1361,8 @@ Initialise a Git repository in the unpacked source\. This is useful for creating Update SPDX license data in the Homebrew repository\. . .TP -\fB\-\-fail\-if\-changed\fR -Return a failing status code if current license data\'s version is different from the upstream\. This can be used to notify CI when the SPDX license data is out of date\. +\fB\-\-fail\-if\-not\-changed\fR +Return a failing status code if current license data\'s version is the same as the upstream\. This can be used to notify CI when the SPDX license data is out of date\. . .TP \fB\-\-commit\fR