A nicer error message when 'run' fails.
This commit is contained in:
parent
ffad3171b7
commit
0b07a9fab8
|
@ -95,6 +95,7 @@ class Pry
|
|||
if command_processor.system_command?(name)
|
||||
command_processor.execute_system_command("#{name} #{args.join(' ')}", target)
|
||||
else
|
||||
raise "#{name.inspect} is not a valid pry command." unless opts[:commands].include? name
|
||||
action = opts[:commands][name][:action]
|
||||
instance_exec(*args, &action)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue