fix: Handle users and groups with spaces over SSH (#448)
This commit is contained in:
parent
9e5eb2fcd1
commit
a6cea1a5b9
2 changed files with 6 additions and 6 deletions
|
|
@ -156,7 +156,7 @@ function SSHConnection.new(url)
|
|||
else
|
||||
self.jid = jid
|
||||
end
|
||||
self:run("whoami", function(err, lines)
|
||||
self:run("id -u", function(err, lines)
|
||||
if err then
|
||||
vim.notify(string.format("Error fetching ssh connection user: %s", err), vim.log.levels.WARN)
|
||||
else
|
||||
|
|
@ -164,7 +164,7 @@ function SSHConnection.new(url)
|
|||
self.meta.user = vim.trim(table.concat(lines, ""))
|
||||
end
|
||||
end)
|
||||
self:run("groups", function(err, lines)
|
||||
self:run("id -G", function(err, lines)
|
||||
if err then
|
||||
vim.notify(
|
||||
string.format("Error fetching ssh connection user groups: %s", err),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue