rbenv / ruby-build

A tool to download, compile, and install Ruby on Unix-like systems.
https://rbenv.org/man/ruby-build.1
MIT License
3.89k stars 785 forks source link

Allow "nonexistent version" test to work without brew #2432

Open piperswe opened 3 months ago

piperswe commented 3 months ago

Currently, this test fails if Homebrew isn't present as it expects a Homebrew-specific output. This commit varies the expected output based on whether Homebrew is installed.

This patch was originally created for the Debian package for ruby-build: https://salsa.debian.org/ruby-team/ruby-build/-/blob/607093e5198cc75ffa8e9a3b551843be5f2f6d93/debian/patches/0001-Fix-nonexistent-version-test-to-work-regardless-of-e.patch

piperswe commented 2 months ago

Turns out I had forgotten the context - the patch is a few years old at this point. It's not actually anything to do with Homebrew, and I can remove that part. The Debian build environment doesn't have the .gitdirectory. I'll update this PR to only check for the existence of .git - I think it's reasonable to want this test to pass when you download the tarball from GitHub instead of cloning.