Sha256: 403719fc56d091e4636ebec8e4ef53f1c22230f155f8a5506a8cc35984f533cb

Contents?: true

Size: 1.17 KB

Versions: 23

Compression:

Stored size: 1.17 KB

Contents

#--
# Author:: Daniel DeLeo (<dan@opscode.com>)
# Copyright:: Copyright (c) 2010 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

require 'chef/shell_out'
require 'chef/config'

class Chef
  module Mixin
    module ShellOut

      def shell_out(*command_args)
        Chef::Log.debug "Shelling out: #{command_args.join(" ")}"
        cmd = Chef::ShellOut.new(*command_args)
        if STDOUT.tty? && Chef::Log.debug?
          cmd.live_stream = STDOUT
        end
        cmd.run_command
        cmd
      end

      def shell_out!(*command_args)
        cmd= shell_out(*command_args)
        cmd.error!
        cmd
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
microwave-0.1006.33 lib/chef/mixin/shell_out.rb
microwave-0.1006.32 lib/chef/mixin/shell_out.rb
microwave-0.1006.31 lib/chef/mixin/shell_out.rb
microwave-0.1006.30 lib/chef/mixin/shell_out.rb
microwave-0.1006.29 lib/chef/mixin/shell_out.rb
microwave-0.1006.27 lib/chef/mixin/shell_out.rb
microwave-0.1006.22 lib/chef/mixin/shell_out.rb
microwave-0.1006.21 lib/chef/mixin/shell_out.rb
microwave-0.1006.20 lib/chef/mixin/shell_out.rb
microwave-0.1006.19 lib/chef/mixin/shell_out.rb
microwave-0.1006.18 lib/chef/mixin/shell_out.rb
microwave-0.1006.17 lib/chef/mixin/shell_out.rb
microwave-0.1006.16 lib/chef/mixin/shell_out.rb
microwave-0.1006.15 lib/chef/mixin/shell_out.rb
microwave-0.1006.14 lib/chef/mixin/shell_out.rb
microwave-0.1006.13 lib/chef/mixin/shell_out.rb
microwave-0.1006.10 lib/chef/mixin/shell_out.rb
microwave-0.1006.9 lib/chef/mixin/shell_out.rb
microwave-0.1006.6 lib/chef/mixin/shell_out.rb
microwave-0.1006.3 lib/chef/mixin/shell_out.rb