summaryrefslogtreecommitdiff
path: root/lib/pry/system_command_handler.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pry/system_command_handler.rb')
-rw-r--r--lib/pry/system_command_handler.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/pry/system_command_handler.rb b/lib/pry/system_command_handler.rb
new file mode 100644
index 00000000..24bea2e3
--- /dev/null
+++ b/lib/pry/system_command_handler.rb
@@ -0,0 +1,15 @@
+class Pry
+ # @api private
+ # @since ?.?.?
+ module SystemCommandHandler
+ class << self
+ def default(output, command, _pry_instance)
+ return if Kernel.system(command)
+
+ output.puts(
+ "Error: there was a problem executing system command: #{command}"
+ )
+ end
+ end
+ end
+end