Method not available on this version
This method is only available on newer versions. The first available version of the method is shown here.
run(command, config = {})
public
Executes a command returning the contents of the command.
Parameters
command |
the command to be executed.
|
config |
give :verbose => false to not log the status, :capture => true to hide to
output. Specify :with to append an executable to command execution.
|
Example
inside('vendor') do
run('ln -s ~/edge rails')
end
Show source
def run(command, config = {})
return unless behavior == :invoke
destination = relative_to_original_destination_root(destination_root, false)
desc = "#{command} from #{destination.inspect}"
if config[:with]
desc = "#{File.basename(config[:with].to_s)} #{desc}"
command = "#{config[:with]} #{command}"
end
say_status :run, desc, config.fetch(:verbose, true)
unless options[:pretend]
config[:capture] ? `
end
end