<filename>thefuck/specific/brew.py<gh_stars>0
import subprocess

from ..utils import memoize
from ..utils import which

brew_available = bool(which("brew"))


@memoize
def get_brew_path_prefix():
    """To get brew path"""
    try:
        return subprocess.check_output(["brew", "--prefix"],
                                       universal_newlines=True).strip()
    except Exception:
        return None
