Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add version check to installer and plugin script #277

Merged
merged 1 commit into from
Apr 15, 2024
Merged
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
5 changes: 5 additions & 0 deletions installer.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
-- - Make code work on all platforms
-- - Add proper error handling

local min_version = "0.10.0"
if vim.fn.has("nvim-" .. min_version) ~= 1 then
error(("rocks.nvim requires Neovim %s (nightly)"):format(min_version))
end

--- The buffer ID of the main UI
---@type number
local buffer = vim.api.nvim_create_buf(false, true)
Expand Down
6 changes: 6 additions & 0 deletions plugin/rocks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ if vim.g.rocks_nvim_loaded then
return
end

local min_version = "0.10.0"
if vim.fn.has("nvim-" .. min_version) ~= 1 then
vim.notify_once(("rocks.nvim requires Neovim %s (nightly)"):format(min_version), vim.log.levels.ERROR)
return
end

local log = require("rocks.log")
log.trace("loading nio")
local nio = require("nio")
Expand Down
Loading