aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/secure.lua
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lua/vim/secure.lua')
-rw-r--r--runtime/lua/vim/secure.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/lua/vim/secure.lua b/runtime/lua/vim/secure.lua
index 266725cce2..0d3a271ac7 100644
--- a/runtime/lua/vim/secure.lua
+++ b/runtime/lua/vim/secure.lua
@@ -26,7 +26,7 @@ end
---
---@param trust table<string, string> Trust table to write
local function write_trust(trust)
- vim.validate({ trust = { trust, 't' } })
+ vim.validate('trust', trust, 'table')
local f = assert(io.open(vim.fn.stdpath('state') .. '/trust', 'w'))
local t = {} ---@type string[]
@@ -49,7 +49,7 @@ end
---@return (string|nil) The contents of the given file if it exists and is
--- trusted, or nil otherwise.
function M.read(path)
- vim.validate({ path = { path, 's' } })
+ vim.validate('path', path, 'string')
local fullpath = vim.uv.fs_realpath(vim.fs.normalize(path))
if not fullpath then
return nil