lib/parallel_tests/tasks.rb in parallel_tests-2.2.1 vs lib/parallel_tests/tasks.rb in parallel_tests-2.2.2

- old
+ new

@@ -12,11 +12,11 @@ end def run_in_parallel(cmd, options={}) count = " -n #{options[:count]}" unless options[:count].to_s.empty? executable = File.expand_path("../../../bin/parallel_test", __FILE__) - command = "#{executable} --exec '#{cmd}'#{count}#{' --non-parallel' if options[:non_parallel]}" + command = "#{Shellwords.escape executable} --exec '#{cmd}'#{count}#{' --non-parallel' if options[:non_parallel]}" abort unless system(command) end # this is a crazy-complex solution for a very simple problem: # removing certain lines from the output without changing the exit-status @@ -145,10 +145,10 @@ if test_framework == 'spinach' type = 'features' end executable = File.join(File.dirname(__FILE__), '..', '..', 'bin', 'parallel_test') - command = "#{executable} #{type} --type #{test_framework} " \ + command = "#{Shellwords.escape executable} #{type} --type #{test_framework} " \ "-n #{count} " \ "--pattern '#{pattern}' " \ "--test-options '#{options}'" if ParallelTests::WINDOWS ruby_binary = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name'])