summaryrefslogtreecommitdiffstats
path: root/lib/puppet/provider/exec/shell.rb
blob: 98f309e8faa9bda7542c0ab3ab816290570e3332 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Puppet::Type.type(:exec).provide :shell, :parent => :posix do
  include Puppet::Util::Execution

  confine :feature => :posix

  desc "Execute external binaries directly, on POSIX systems.
passing through a shell so that shell built ins are available."

  def run(command, check = false)
    command = %Q{/bin/sh -c "#{command.gsub(/"/,'\"')}"}
    super(command, check)
  end

  def validatecmd(command)
    true
  end
end