'brew install' Not Running Custom Install from Formula

Not sure if I’m supposed to file a bug report for this or not, but the issue reporting on Github said I should post here if I’m unsure.

I’m trying to edit the default Formula for HAProxy (haproxy.rb) because I need to add extra arguments to be sent to HAProxy’s Makefile. However, no matter what changes I make to the ‘install’ method in haproxy.rb, ‘brew install haproxy’ behaves the exact same way. I tried fully deleting the ‘install’ method and it still didn’t affect how ‘brew install haproxy’ ran. This makes me think that Homebrew is completely ignoring the custom install method within haproxy.rb.

I know that haproxy.rb is being used, because when I edit the 'plist_options :manual => ’ line, my changes appear when I run ‘brew install haproxy’. I’ve tried running ‘brew install --debug --verbose haproxy’, but it didn’t give any indication that the custom install method had been run at all. I’ve tried literally just changing the install method to

def install

and nothing has appeared in the output.

How is it possible that the custom install method isn’t being used? Is there anything I’m missing?

Update: the problem appeared to be that I had been just accessing a cached .tar file over and over, and not actually installing from new each time. I fixed this by changing the version I was using within the haproxy.rb file.

I think you might need brew install --from-source haproxy otherwise it’ll just give you the pre-built binaries.