Skip to content

Commit

Permalink
Merge pull request travis-ci#477 from travis-ci/fix_report
Browse files Browse the repository at this point in the history
fix the error on report when the enterprise config doesn't exist
  • Loading branch information
renee-travisci authored Jan 26, 2017
2 parents b0d7cb9 + f566352 commit 7e36538
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
Gemfile.lock
spec/tmp
doc
.ruby*
4 changes: 2 additions & 2 deletions lib/travis/cli/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def endpoint_name(url, prefix = "")
when Travis::Client::PRO_URI then "#{prefix}pro"
when /api-staging\.travis-ci/ then endpoint_name(url.sub("api-staging.", "api."), "staging-")
else
key, _ = config['enterprise'].detect { |k,v| v.start_with? url }
key, _ = config['enterprise'].detect { |k,v| v.start_with? url } if config['enterprise'].respond_to?(:detect)
key ? "enterprise %p" % key : "???"
end
end
Expand All @@ -98,4 +98,4 @@ def user_info
end
end
end
end
end

0 comments on commit 7e36538

Please sign in to comment.