Replies: 1 comment 1 reply
-
You can only trust the current file. Trusting non-current file is not allowed, for security reasons (e.g. a malicious process may change its content behind your back while you are typing the command). |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I'm trying to automate trusting a file (
:h vim.secure
and:h :trust
) for a test case. I tried manually executing the following:But each time I get
E475: Invalid argument: ~/Developer/vim/start/neotest-busted/.busted
or whatever the path is. I tried putting quotes around the path but I get the same error. Is there something I am missing here?I can trust a file when I allow it manually after calling
vim.secure.read
, but I want to whitelist the file without an interactive prompt because I want to use it in automated testing. For some reasonvim.secure.trust
does not allow file paths withaction = 'allow'
(why though?), so the:trust
command seems like the way to go.My Neovim version is 0.9.5 on Void Linux installed from their package repos.
Beta Was this translation helpful? Give feedback.
All reactions