Giter Club home page Giter Club logo

Comments (8)

MikeMcQuaid avatar MikeMcQuaid commented on September 25, 2024 1

I can see how this might be our most viable fix, but I'd strongly prefer a solution that retains the if and unless calls here.

I can't see how this can be made to work with the API unless we're embedding Ruby source.

from brew.

nbro avatar nbro commented on September 25, 2024

I solved the problem by just uninstalling and installing again postgresql@14 and then manually running

initdb --locale=C -E UTF-8 /usr/local/var/postgresql@14

which should have been run automatically, according to the message we see when we install postgresql@14

...
This formula has created a default database cluster with:
  initdb --locale=C -E UTF-8 /usr/local/var/postgresql@14
For more details, read:
  https://www.postgresql.org/docs/14/app-initdb.html
...

So, there's a bug either in the installation or documentation/message

from brew.

carlocab avatar carlocab commented on September 25, 2024

The caveats1 should've shown you how to handle this but this doesn't interact well with API installs. So that is a bug. CC @Homebrew/brew

Footnotes

  1. https://github.com/Homebrew/homebrew-core/blob/262db065cc1ce35f13b143a145b7580e9447a00f/Formula/p/postgresql%4014.rb#L141-L168

from brew.

MikeMcQuaid avatar MikeMcQuaid commented on September 25, 2024

Agreed on 🐛. Fix should be:

  • print caveats unconditionally in this case
  • add a RuboCop to avoid if/unless in caveats

from brew.

carlocab avatar carlocab commented on September 25, 2024

Agreed on 🐛. Fix should be:

  • print caveats unconditionally in this case

  • add a RuboCop to avoid if/unless in caveats

I can see how this might be our most viable fix, but I'd strongly prefer a solution that retains the if and unless calls here.

Many users blindly run what caveats show them, so I'd like to avoid showing them commands we know they don't need to run. Adding notes that most users can ignore to caveats will also tend to make them ignore ones they shouldn't.

from brew.

carlocab avatar carlocab commented on September 25, 2024

I can't see how this can be made to work with the API unless we're embedding Ruby source.

I'm not opposed to that, but I don't think we need to. There is already a mechanism for fetching the Ruby source separately, which is why we have the ruby_source_checksum in the API JSON. Alternatively, the Ruby source is in the bottle, so we can read that after pouring and update the caveats from there.

from brew.

MikeMcQuaid avatar MikeMcQuaid commented on September 25, 2024

Alternatively, the Ruby source is in the bottle, so we can read that after pouring and update the caveats from there.

This would work. Would mean it's not going to show with brew info before installation, in case that matters.

from brew.

carlocab avatar carlocab commented on September 25, 2024

Would mean it's not going to show with brew info before installation, in case that matters.

This is fine with me, I think.

from brew.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.