diff --git a/Library/Homebrew/dev-cmd/bump-cask-pr.rb b/Library/Homebrew/dev-cmd/bump-cask-pr.rb index 4b4ffdfc0d..a533cbe132 100644 --- a/Library/Homebrew/dev-cmd/bump-cask-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-cask-pr.rb @@ -22,8 +22,9 @@ module Homebrew EOS switch "-n", "--dry-run", description: "Print what would be done rather than doing it." - switch "--write", + switch "--write-only", description: "Make the expected file modifications without taking any Git actions." + switch "--write", hidden: true switch "--commit", depends_on: "--write", description: "When passed with `--write`, generate a new commit after writing changes "\ @@ -61,6 +62,8 @@ module Homebrew def bump_cask_pr args = bump_cask_pr_args.parse + odeprecated "`brew bump-cask-pr --write`", "`brew bump-cask-pr --write-only`" if args.write? + # This will be run by `brew style` later so run it first to not start # spamming during normal output. Homebrew.install_bundler_gems! diff --git a/Library/Homebrew/utils/github.rb b/Library/Homebrew/utils/github.rb index ef3fa379bd..c1c64b8908 100644 --- a/Library/Homebrew/utils/github.rb +++ b/Library/Homebrew/utils/github.rb @@ -488,7 +488,7 @@ module GitHub changed_files = [sourcefile_path] changed_files += additional_files if additional_files.present? - if args.dry_run? || (args.write? && !args.commit?) + if args.dry_run? || (args.write_only? && !args.commit?) remote_url = if args.no_fork? Utils.popen_read("git", "remote", "get-url", "--push", "origin").chomp else