Code Monkey home page Code Monkey logo

Comments (4)

bfontaine avatar bfontaine commented on July 24, 2024 4

Thanks for the report! Sorry, I was away for the weekend. I just fixed the first issue (error message; 0a6cff1) as well as the second (doesn’t work; 5d0556b). Just run brew update to get the fixes.

As far as I understand, Homebrew is increasingly moving from code where constants and classes are explicitely required rather than being globally available. This is a good thing, but it breaks code that rely on that global availability, like here.

from homebrew-command-not-found.

peterlobster avatar peterlobster commented on July 24, 2024 3

@andrewcrook I was coming to open this very same issue. 😁

I fixed this issue by updating my configuration for bash.

What I had:

# Homebrew - Command Not Found - Reproduces Ubuntu’s command-not-found for Homebrew users on macOS.
# https://github.com/Homebrew/homebrew-command-not-found
if brew command command-not-found-init > /dev/null; then
    eval "$(brew command-not-found-init)"

What I changed it to:

# Homebrew - Command Not Found - Reproduces Ubuntu’s command-not-found for Homebrew users on macOS.
# https://github.com/Homebrew/homebrew-command-not-found#install
HB_CNF_HANDLER="$(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-command-not-found/handler.sh"
if [ -f "$HB_CNF_HANDLER" ]; then
source "$HB_CNF_HANDLER";
fi

👉 That got rid of the error at shell startup, but now it just tool doesn't work at all...

$ when
when: command not found

from homebrew-command-not-found.

andrewcrook avatar andrewcrook commented on July 24, 2024

@peterlobster
Yes, I believe both should work.
I use the first example in my.zshrc
command-not-found should add commands to extend brew so that you can initialise it via brew command.
I am busy at the moment,however,if I find anything I will post here. I am sure it's something to do with the brew-core update.

from homebrew-command-not-found.

gigaimage avatar gigaimage commented on July 24, 2024

I was going to open an issue for the same.
Same here. Exact error as seen by @andrewcrook.
I changed exactly what @peterlobster did, and same results.

from homebrew-command-not-found.

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.