-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
38 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
local remote_nvim = require("remote-nvim") | ||
local utils = require("remote-nvim.utils") | ||
local M = {} | ||
|
||
local function verify_binary(binary_name) | ||
local succ, _ = pcall(utils.find_binary, binary_name) | ||
if not succ then | ||
vim.health.error(("`%s` executable not found."):format(binary_name)) | ||
else | ||
vim.health.ok(("`%s` executable found."):format(binary_name)) | ||
end | ||
end | ||
-- TODO: create a test that checks that a devcontainer can be brought up, | ||
-- this needs to be done after creating the ability to stop a container | ||
-- TODO: create a test that checks that a command can be executed within the | ||
-- running container | ||
|
||
function M.check() | ||
vim.health.start("devcontainer_cli") | ||
local required_binaries = { | ||
"docker", | ||
"devcontainer-cli", | ||
} | ||
for _, bin_name in ipairs(required_binaries) do | ||
verify_binary(bin_name) | ||
end | ||
end | ||
|
||
return M |