Improve brew* rules import time

This commit is contained in:
mcarton
2015-08-26 19:46:23 +02:00
parent 2b750bac8b
commit b0702d309f
5 changed files with 56 additions and 59 deletions
+15
View File
@@ -0,0 +1,15 @@
import subprocess
from thefuck.utils import memoize, which
enabled_by_default = 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:
return None