Method: Pry::Editor#invoke_editor
- Defined in:
- lib/pry/editor.rb
#invoke_editor(file, line, blocking = true) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/pry/editor.rb', line 41 def invoke_editor(file, line, blocking = true) unless pry_instance.config.editor raise CommandError, "Please set Pry.config.editor or export $VISUAL or $EDITOR" end editor_invocation = build_editor_invocation_string(file, line, blocking) return nil unless editor_invocation if Helpers::Platform.jruby? open_editor_on_jruby(editor_invocation) else open_editor(editor_invocation) end end |