1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

now passing output object and pry instance into Pry.config.system proc

This commit is contained in:
John Mair 2011-09-18 00:42:29 +12:00
parent b8af3ce006
commit 8f6878e0e3
3 changed files with 4 additions and 3 deletions

View file

@ -114,7 +114,7 @@ class Pry
end,
]
DEFAULT_SYSTEM = proc do |cmd|
DEFAULT_SYSTEM = proc do |output, cmd, _|
if !system(cmd)
output.puts "Error: there was a problem executing system command: #{cmd}"
end

View file

@ -120,7 +120,8 @@ class Pry
attr_accessor :control_d_handler
# @return [Proc] The proc that runs system commands
# The proc is passed the command string to eval
# The proc is passed the pry output object, the command string
# to eval, and a reference to the pry instance
attr_accessor :system
end
end

View file

@ -12,7 +12,7 @@ class Pry
output.puts "No such directory: #{dest}"
end
else
Pry.config.system.call(cmd)
Pry.config.system.call(output, cmd, _pry_)
end
end