Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lua/remote-nvim/providers/executor.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ local Executor = require("remote-nvim.middleclass")("Executor")
---@field exit_cb function? On exit callback
---@field compression remote-nvim.provider.Executor.JobOpts.CompressionOpts? Compression options; for upload and download

local utils = require("remote-nvim.utils")
---Initialize executor instance
---@param host string Host name
---@param conn_opts? string Connection options (passed when connecting)
function Executor:init(host, conn_opts)
self.host = host
self.conn_opts = conn_opts or ""

self.logger = utils.get_logger()
self._job_id = nil
self._job_exit_code = nil
self._job_stdout = {}
Expand Down Expand Up @@ -71,6 +73,7 @@ end
---@param command string Command which should be started as a job
---@param job_opts remote-nvim.provider.Executor.JobOpts
function Executor:run_executor_job(command, job_opts)
self.logger.fmt_debug("Executor running command %s with options %s", command, job_opts)
local co = coroutine.running()
job_opts = job_opts or {}

Expand Down
2 changes: 1 addition & 1 deletion lua/remote-nvim/providers/provider.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ end
function Provider:_setup_workspace_variables()
if vim.tbl_isempty(self._config_provider:get_workspace_config(self.unique_host_id)) then
self.logger.debug("Did not find any existing configuration. Creating one now..")
self:run_command("echo 'Hello'", "Testing remote connection")
self:run_command("pwd", "Testing remote connection")
self._config_provider:add_workspace_config(self.unique_host_id, {
provider = self.provider_type,
host = self.host,
Expand Down