tap-new: fix symlink creation.

Ensure the full HOMEBREW_TAP_DIR path is created before deleting and
creating the symlink for it. This ensures that non-`homebrew` taps will
have the necessary username/organisation folder created.

Fixes #2378.
This commit is contained in:
Mike McQuaid 2017-03-22 21:23:00 +00:00
parent 17cc40f112
commit 5fc4cabdeb

View File

@ -60,6 +60,7 @@ module Homebrew
- git -C "$HOMEBREW_REPOSITORY" reset --hard origin/master
- brew update || brew update
- HOMEBREW_TAP_DIR="$(brew --repo "$TRAVIS_REPO_SLUG")"
- mkdir -p "$HOMEBREW_TAP_DIR"
- rm -rf "$HOMEBREW_TAP_DIR"
- ln -s "$PWD" "$HOMEBREW_TAP_DIR"
- export HOMEBREW_DEVELOPER="1"