Repository: buildr
Updated Branches:
  refs/heads/master 0111ee65d -> 4a5a5cb99


Support java_args being specified by both a string and an array.

This patch restores support for arrays that was lost after change 
4e24616239d8c455f51e1b2058c3e83060731511


Project: http://git-wip-us.apache.org/repos/asf/buildr/repo
Commit: http://git-wip-us.apache.org/repos/asf/buildr/commit/4a5a5cb9
Tree: http://git-wip-us.apache.org/repos/asf/buildr/tree/4a5a5cb9
Diff: http://git-wip-us.apache.org/repos/asf/buildr/diff/4a5a5cb9

Branch: refs/heads/master
Commit: 4a5a5cb994e11eb19774eea16853a7bd7723052b
Parents: 0111ee6
Author: Peter Donald <[email protected]>
Authored: Sat Mar 19 20:26:58 2016 +1100
Committer: Peter Donald <[email protected]>
Committed: Sat Mar 19 20:27:20 2016 +1100

----------------------------------------------------------------------
 addon/buildr/jacoco.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/buildr/blob/4a5a5cb9/addon/buildr/jacoco.rb
----------------------------------------------------------------------
diff --git a/addon/buildr/jacoco.rb b/addon/buildr/jacoco.rb
index fbb0b0a..8bddf81 100644
--- a/addon/buildr/jacoco.rb
+++ b/addon/buildr/jacoco.rb
@@ -138,7 +138,8 @@ module Buildr
             options << "excludes=#{project.jacoco.excludes.join(':')}" unless 
project.jacoco.excludes.empty?
 
             agent_config = "-javaagent:#{agent_jar}=#{options.join(',')}"
-            project.test.options[:java_args] = 
([project.test.options[:java_args]] || []) + [agent_config]
+            existing = project.test.options[:java_args] || []
+            project.test.options[:java_args] = (existing.is_a?(Array)? 
existing : [existing]) + [agent_config]
           end
           namespace 'jacoco' do
             if project.jacoco.generate_xml?

Reply via email to