-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom options can't be enabled #7498
Comments
|
But it worked up until the latest changes in master. Is there a way to conditionally install a patch? |
@d12frosted Can you narrow it down to a specific commit? Can you see if If you can submit a PR that would be best but can consider reopening with more information. Thanks! |
Sure, I've found an offending commit: 66ac96a. If I revert it, everything works. Regarding the class Foo < Formula
desc ""
homepage ""
url "https://ftp.gnu.org/gnu/emacs/emacs-26.3.tar.xz"
sha256 "4d90e6751ad8967822c6e092db07466b9d383ef1653feb2f95c93e7de66d3485"
# depends_on "cmake" => :build
option "with-ham", "Description of the option"
option "without-spam", "Another description"
if build.with? "ham"
puts "[pre] with-ham"
else
puts "[pre] without-ham"
end
def install
if build.with? "ham"
puts "[install] with-ham"
else
puts "[install] without-ham"
end
# ENV.deparallelize
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}"
# system "cmake", ".", *std_cmake_args
system "make", "install"
end
test do
system "false"
end
end Output:
As you can see, in both cases it's Should I just update this issue or open a new one? Or maybe two? :) |
Thanks for the clarification! CC @GauthamGoli FYI |
Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew config
andbrew doctor
and included their output with your issue?What you were trying to do (and why)
I was trying to install custom formula with custom options. Actually, I found this issue on a formula with decent amount of options, but it can be reproduced with much smaller formula (basically, took it from the cookbook).
What happened (include command output)
Command output
What you expected to happen
Option
--with-ham
should lead to>>> with-ham
in the logs instead of>>> without-ham
.Step-by-step reproduction instructions (by running
brew
commands)brew install Foo.rb --with-ham
This doesn't repeat on the stable version, so I had to disable auto update and reset to the latest master.
Output of
brew config
andbrew doctor
commandsThe text was updated successfully, but these errors were encountered: