fix: ssh adapter supports any system with /bin/sh (#161)

This allows support of other *nix operating systems where bash is not
universally present.
This commit is contained in:
Mahlon E. Smith 2023-08-24 09:17:54 -07:00 committed by GitHub
parent e45aeebc2b
commit ebcd720a09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View file

@ -83,12 +83,11 @@ end
function SSHConnection.new(url)
local command = SSHConnection.create_ssh_command(url)
vim.list_extend(command, {
"/bin/bash",
"--norc",
"/bin/sh",
"-c",
-- HACK: For some reason in my testing if I just have "echo READY" it doesn't appear, but if I echo
-- anything prior to that, it *will* appear. The first line gets swallowed.
"echo '_make_newline_'; echo '===READY==='; exec /bin/bash --norc",
"echo '_make_newline_'; echo '===READY==='; exec /bin/sh",
})
local term_bufnr = vim.api.nvim_create_buf(false, true)
local self = setmetatable({