diff --git a/dev.sh b/dev.sh old mode 100644 new mode 100755 index ca08299..fcce219 --- a/dev.sh +++ b/dev.sh @@ -10,7 +10,7 @@ fi #default snappy and leveldb install path #you may change yourself -HOMEBREW_PREFIX=$(brew --prefix 2>/dev/null) +HOMEBREW_PREFIX=$(type brew >/dev/null 2>&1 && brew --prefix 2>/dev/null) if [[ ! -z "$HOMEBREW_PREFIX" ]]; then SNAPPY_DIR=$HOMEBREW_PREFIX/opt/snappy LEVELDB_DIR=$HOMEBREW_PREFIX/opt/leveldb