lib/travis/cli/repo_command.rb in travis-1.5.3 vs lib/travis/cli/repo_command.rb in travis-1.5.4

- old
+ new

@@ -42,15 +42,14 @@ def detected_endpoint? !explicit_api_endpoint? end def find_slug - git_head = `git name-rev --name-only HEAD 2>&1`.chomp - git_remote = `git config --get branch.#{git_head}.remote 2>&1`.chomp - # Default to 'origin' if no tracking is set + git_head = `git name-rev --name-only HEAD 2>#{IO::NULL}`.chomp + git_remote = `git config --get branch.#{git_head}.remote 2>#{IO::NULL}`.chomp git_remote = 'origin' if git_remote.empty? - git_info = `git config --get remote.#{git_remote}.url 2>&1`.chomp + git_info = `git config --get remote.#{git_remote}.url 2>#{IO::NULL}`.chomp $1 if git_info =~ GIT_REGEX end def repo_config config['repos'] ||= {} @@ -62,9 +61,10 @@ repo_config['endpoint'] = api_endpoint elsif ENV['TRAVIS_ENDPOINT'] ENV['TRAVIS_ENDPOINT'] else repo_config['endpoint'] ||= begin + load_gh GH.head("/repos/#{slug}") Travis::Client::ORG_URI rescue GH::Error Travis::Client::PRO_URI end