diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-03-05 13:58:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-05 13:58:19 +0800 |
commit | 18ae2db54c30a57c399b5fb203fdb6deec5adc32 (patch) | |
tree | f1a9f9deeb15bbbe1da856450003aff10eea688c /script | |
parent | 28322ce7e26144d5fd36c40fcdb543eed7536bac (diff) | |
parent | 606e9cd238dbc924929d7047497de30ff44ee50c (diff) | |
download | lua-language-server-18ae2db54c30a57c399b5fb203fdb6deec5adc32.zip |
Merge pull request #2553 from emmericp/trust-all-plugins
Add CLI option to trust all plugins
Diffstat (limited to 'script')
-rw-r--r-- | script/global.d.lua | 4 | ||||
-rw-r--r-- | script/plugin.lua | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/script/global.d.lua b/script/global.d.lua index cee9e01b..40329996 100644 --- a/script/global.d.lua +++ b/script/global.d.lua @@ -90,3 +90,7 @@ SOCKET = 0 -- Allowing the use of the root directory or home directory as the workspace FORCE_ACCEPT_WORKSPACE = false + +-- Trust all plugins that are being loaded by workspace config files. +-- This is potentially unsafe for normal use and meant for usage in CI environments only. +TRUST_ALL_PLUGINS = false diff --git a/script/plugin.lua b/script/plugin.lua index 35a1da5b..26211a42 100644 --- a/script/plugin.lua +++ b/script/plugin.lua @@ -73,6 +73,9 @@ end ---@async ---@param scp scope local function checkTrustLoad(scp) + if TRUST_ALL_PLUGINS then + return true + end local pluginPath = scp:get('pluginPath') local filePath = LOGPATH .. '/trusted' local trusted = util.loadFile(filePath) |