lib/dpl/provider.rb in dpl-1.10.6.travis.3118.5 vs lib/dpl/provider.rb in dpl-1.10.6.travis.3119.5
- old
+ new
@@ -156,10 +156,14 @@
attr_reader :context, :options
def initialize(context, options)
@context, @options = context, options
- context.env['GIT_HTTP_USER_AGENT'] = user_agent(git: `git --version`[/[\d\.]+/])
+ if options.key?(:needs_git_http_user_agent) && !options[:needs_git_http_user_agent]
+ context.env.delete 'GIT_HTTP_USER_AGENT'
+ else
+ context.env['GIT_HTTP_USER_AGENT'] = user_agent(git: `git --version`[/[\d\.]+/])
+ end
end
def user_agent(*strings)
strings.unshift "dpl/#{DPL::VERSION}"
strings.unshift "travis/0.1.0" if context.env['TRAVIS']