A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/Homebrew/brew/issues/7498 below:

Custom options can't be enabled · Issue #7498 · Homebrew/brew · GitHub

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. 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).

class Foo < Formula
  desc ""
  homepage ""
  url "https://example.com/foo-0.1.tar.gz"
  sha256 "85cc828a96735bdafcf29eb6291ca91bac846579bcef7308536e0c875d6c81d7"

  # depends_on "cmake" => :build

  option "with-ham", "Description of the option"
  option "without-spam", "Another description"

  if build.with? "ham"
    puts ">>> with-ham"
  else
    puts ">>> without-ham"
  end

  def install
    # 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
What happened (include command output)
$ brew install Foo.rb --with-ham
Command output

$ brew install Foo.rb --with-ham
>>> without-ham
>>> without-ham
==> Downloading https://example.com/foo-0.1.tar.gz
#=#=-# #
curl: (22) The requested URL returned error: 404
Error: An exception occurred within a child process:
DownloadError: Failed to download resource "Foo"
Download failed: https://example.com/foo-0.1.tar.gz

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)
  1. save provided formula somewhere
  2. brew install Foo.rb --with-ham
  3. Check the logs.

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 and brew doctor commands
$ brew config
HOMEBREW_VERSION: 2.2.14-66-g53fe2c9
ORIGIN: https://github.com/Homebrew/brew
HEAD: 53fe2c94dbfecf78192fd05b7c3adc245e67f8d6
Last commit: 56 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 46b41b27375cff5e875c26df9c7f3576e88eccc8
Core tap last commit: 8 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.YAGwrukjae/org.macosforge.xquartz:0
HOMEBREW_EDITOR: emacsclient
HOMEBREW_MAKE_JOBS: 8
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1103
Git: 2.26.2 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 14.0.1
macOS: 10.15.4-x86_64
CLT: 11.4.1.0.1.1586360307
Xcode: N/A
XQuartz: 2.7.11 => /opt/X11

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Putting non-prefixed coreutils in your path can cause gmp builds to fail.

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  haskell-stack

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4