ruby-build icon indicating copy to clipboard operation
ruby-build copied to clipboard

Allow "nonexistent version" test to work without brew

Open piperswe opened this issue 1 year ago • 1 comments

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 avatar Aug 14 '24 06:08 piperswe

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.

piperswe avatar Aug 27 '24 18:08 piperswe

Thanks for this and sorry for the late reaction. I've amended the approach in a way that I find easier to read/maintain: temporarily create the .git directory if missing.

mislav avatar Jan 21 '25 21:01 mislav