Do not check for a branch until after we have found git

This commit is contained in:
Seth Vargo 2014-11-13 18:00:30 -05:00
parent ea512a95f3
commit 7e3de3951e
1 changed files with 3 additions and 3 deletions

View File

@ -10,15 +10,15 @@ module VagrantPlugins
# Expand any paths relative to the root
dir = File.expand_path(config.dir, env.root_path)
# Get the current branch
branch = git_branch(dir)
# Verify git is installed
verify_git_bin!(config.git_bin)
# Verify we are operating in a git repo
verify_git_repo!(dir)
# Get the current branch
branch = git_branch(dir)
# Check if we need to add the git remote
if !has_git_remote?(config.remote, dir)
add_heroku_git_remote(config.remote, config.app, dir)