Skip to content

Commit

Permalink
Don't use bash and stty to spawn child process
Browse files Browse the repository at this point in the history
  • Loading branch information
tompng committed Sep 16, 2024
1 parent 3525535 commit 29c903d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/yamatanooroti/vterm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ def start_terminal(height, width, command, wait: 0.01, timeout: 2, startup_messa
@wait = wait
@result = nil

@pty_output, @pty_input, @pid = PTY.spawn('bash', '-c', %[stty rows #{height.to_s} cols #{width.to_s}; "$@"], '--', *command)
@pty_output, @pty_input, @pid = PTY.spawn(*command)
@pty_output.winsize = [height, width]

@vterm = VTerm.new(height, width)
@vterm.set_utf8(true)
Expand Down

0 comments on commit 29c903d

Please sign in to comment.