Sha256: cdf27b0ccf50c853d0f4bb38d40938917351b1a19cf61aa2af8e61ae57c2a218

Contents?: true

Size: 795 Bytes

Versions: 32

Compression:

Stored size: 795 Bytes

Contents

# frozen_string_literal: true

Puppet::Type.type(:exec).provide :shell, :parent => :posix do
  include Puppet::Util::Execution

  confine :feature => :posix

  desc <<-EOT
    Passes the provided command through `/bin/sh`; only available on
    POSIX systems. This allows the use of shell globbing and built-ins, and
    does not require that the path to a command be fully-qualified. Although
    this can be more convenient than the `posix` provider, it also means that
    you need to be more careful with escaping; as ever, with great power comes
    etc. etc.

    This provider closely resembles the behavior of the `exec` type
    in Puppet 0.25.x.
  EOT

  def run(command, check = false)
    super(['/bin/sh', '-c', command], check)
  end

  def validatecmd(command)
    true
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
puppet-8.10.0 lib/puppet/provider/exec/shell.rb
puppet-8.10.0-x86-mingw32 lib/puppet/provider/exec/shell.rb
puppet-8.10.0-x64-mingw32 lib/puppet/provider/exec/shell.rb
puppet-8.10.0-universal-darwin lib/puppet/provider/exec/shell.rb
puppet-8.9.0 lib/puppet/provider/exec/shell.rb
puppet-8.9.0-x86-mingw32 lib/puppet/provider/exec/shell.rb
puppet-8.9.0-x64-mingw32 lib/puppet/provider/exec/shell.rb
puppet-8.9.0-universal-darwin lib/puppet/provider/exec/shell.rb
puppet-8.8.1 lib/puppet/provider/exec/shell.rb
puppet-8.8.1-x86-mingw32 lib/puppet/provider/exec/shell.rb
puppet-8.8.1-x64-mingw32 lib/puppet/provider/exec/shell.rb
puppet-8.8.1-universal-darwin lib/puppet/provider/exec/shell.rb
puppet-8.7.0 lib/puppet/provider/exec/shell.rb
puppet-8.7.0-x86-mingw32 lib/puppet/provider/exec/shell.rb
puppet-8.7.0-x64-mingw32 lib/puppet/provider/exec/shell.rb
puppet-8.7.0-universal-darwin lib/puppet/provider/exec/shell.rb
puppet-8.6.0 lib/puppet/provider/exec/shell.rb
puppet-8.6.0-x86-mingw32 lib/puppet/provider/exec/shell.rb
puppet-8.6.0-x64-mingw32 lib/puppet/provider/exec/shell.rb
puppet-8.6.0-universal-darwin lib/puppet/provider/exec/shell.rb