diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb index 80a6a019a7..cf17914f10 100644 --- a/Library/Homebrew/cmd/upgrade.rb +++ b/Library/Homebrew/cmd/upgrade.rb @@ -120,6 +120,10 @@ module Homebrew sig { override.void } def run + if args.build_from_source? && args.named.empty? + raise ArgumentError, "--build-from-source requires at least one formula" + end + formulae, casks = args.named.to_resolved_formulae_to_casks # If one or more formulae are specified, but no casks were # specified, we want to make note of that so we don't