From 0b07a9fab881a160aca505ad9d72b38924813fa6 Mon Sep 17 00:00:00 2001 From: epitron Date: Mon, 18 Apr 2011 15:18:44 -0400 Subject: [PATCH] A nicer error message when 'run' fails. --- lib/pry/command_base.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/pry/command_base.rb b/lib/pry/command_base.rb index a6ec92a7..06035421 100644 --- a/lib/pry/command_base.rb +++ b/lib/pry/command_base.rb @@ -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