We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05e31ad commit ee2ca39Copy full SHA for ee2ca39
lua/lazy/core/meta.lua
@@ -66,6 +66,17 @@ function M:add(plugin)
66
67
table.insert(meta._.frags, fragment.id)
68
69
+ if meta._ and meta._.rtp_loaded then
70
+ local old_dir = meta.dir
71
+ self:_rebuild(meta.name)
72
+ local new_dir = meta.dir
73
+ if old_dir ~= new_dir then
74
+ local msg = "Plugin `" .. meta.name .. "` changed `dir`:\n- from: `" .. old_dir .. "`\n- to: `" .. new_dir .. "`"
75
+ msg = msg .. "\n\nThis plugin was already partially loaded, so things may break.\nPlease fix your config."
76
+ self.spec:error(msg)
77
+ end
78
79
+
80
if plugin.name then
81
-- handle renames
82
if meta.name ~= plugin.name then
0 commit comments