Skip to content

Set brew environment variables with eval (brew shellenv) #8

@simonrouse9461

Description

@simonrouse9461

Setting up brew environment isn't just about setting the path. Homebrew has a command brew shellenv for configuring all the environment variables need to be set.

Here is what brew shellenv returns

set -gx HOMEBREW_PREFIX "/usr/local";
set -gx HOMEBREW_CELLAR "/usr/local/Cellar";
set -gx HOMEBREW_REPOSITORY "/usr/local/Homebrew";
set -g fish_user_paths "/usr/local/bin" "/usr/local/sbin" $fish_user_paths;
set -q MANPATH; or set MANPATH ''; set -gx MANPATH "/usr/local/share/man" $MANPATH;
set -q INFOPATH; or set INFOPATH ''; set -gx INFOPATH "/usr/local/share/info" $INFOPATH;

So for complete brew integration, eval ($HOMEBREW_BIN shellenv) need to be added to the beginning of the script, where $HOMEBREW_BIN has a default value of "/usr/local/bin/brew", but can be overridden by the user in "before.init.fish" in the omf configuration path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions