View | Details | Raw Unified | Return to bug 171188
Collapse All | Expand All

(-)lib/puppet/provider/exec.rb 2012-08-30 12:31:32.000000000 -0400 (-5 / +3 lines)
Lines 66-76 Link Here
66
  end
66
  end
67
  def extractexe(command)
67
  def extractexe(command)
68
    if command.is_a? Array
68
    # easy case: command was quoted
69
      command.first
69
    if command =~ /^"([^"]+)"/
70
    elsif match = /^"([^"]+)"|^'([^']+)'/.match(command)
70
      $1
71
      # extract whichever of the two sides matched the content.
72
      match[1] or match[2]
73
    else
71
    else
74
      command.split(/ /)[0]
72
      command.split(/ /)[0]
75
    end
73
    end

Return to bug 171188