lib/vagrant-orchestrate/plugin.rb in vagrant-orchestrate-0.3.1 vs lib/vagrant-orchestrate/plugin.rb in vagrant-orchestrate-0.3.2
- old
+ new
@@ -86,10 +86,10 @@
@logger.debug("Reading git branch")
if ENV["GIT_BRANCH"]
git_branch = ENV["GIT_BRANCH"]
@logger.debug("Read git branch #{git_branch} from GIT_BRANCH environment variable")
else
- command = "git rev-parse --abbrev-ref HEAD"
+ command = "git rev-parse --abbrev-ref HEAD 2>&1"
git_branch = `#{command}`.chomp
if git_branch.include? "fatal"
@logger.error("Unable to determine git branch `#{command}`. Is this a git repo?")
git_branch = nil
else