Skip to content

Commit b207178

Browse files
committed
Resolve ruby#726 Panic Nova Edit Feature
When typing “edit” into the debugger, Panic Nova would not wait because it requires the -w flag, and the call to system was not respecting it. This commit uses the Shellwords.split method to separate it into another argument for system so Nova or other editors that require a flag work properly.
1 parent 7f18c82 commit b207178

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/debug/thread_client.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
require 'objspace'
44
require 'pp'
5+
require 'shellwords'
56

67
require_relative 'color'
78

@@ -643,7 +644,7 @@ def show_by_editor path = nil
643644
if editor = (ENV['RUBY_DEBUG_EDITOR'] || ENV['EDITOR'])
644645
puts "command: #{editor}"
645646
puts " path: #{path}"
646-
system(editor, path)
647+
system(*Shellwords.split(editor), path)
647648
else
648649
puts "can not find editor setting: ENV['RUBY_DEBUG_EDITOR'] or ENV['EDITOR']"
649650
end

0 commit comments

Comments
 (0)