XcodeGen icon indicating copy to clipboard operation
XcodeGen copied to clipboard

Homebrew install failure @ specific version

Open sebastianv1 opened this issue 4 years ago • 1 comments

Hello! We are looking to pin Xcodegen installed via Homebrew to a specific version by extracting it into our own internal tap (more info here: https://docs.brew.sh/Taps).

When attempting to install the versioned formula brew install <internal-tap-path>/[email protected] we receive the following error:

Error: An exception occurred within a child process:
  Errno::ENOENT: No such file or directory - .build/release/[email protected]

This fails because the formula uses the name property on Formula to locate the path of built product which resolves to [email protected] when using brew extract.

def install
    system "swift", "build", "--disable-sandbox", "-c", "release"
    bin.install ".build/release/#{name}"
    pkgshare.install "SettingPresets"
end

Is there a reason to use the name property instead of hardcoding xcodegen in the product path? Happy to help update the formula in homebrew-core, but thought I'd start the discussion here.

sebastianv1 avatar Oct 19 '21 21:10 sebastianv1

Hi @sebastianv1. There's no real reason it uses name, I think one of the Homebrew maintainers added that. Feel free to open a PR to edit the formula 👍

yonaskolb avatar Nov 07 '21 10:11 yonaskolb