File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -243,6 +243,7 @@ function M.update_state()
243243 else
244244 plugin ._ .is_local = true
245245 plugin ._ .installed = true -- local plugins are managed by the user
246+ plugin ._ .installed = vim .fn .isdirectory (plugin .dir ) == 1
246247 end
247248 end
248249
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ function M.install(opts)
8080 opts = M .opts (opts , { mode = " install" })
8181 return M .run ({
8282 pipeline = {
83+ " plugin.exists" ,
8384 " git.clone" ,
8485 { " git.checkout" , lockfile = opts .lockfile },
8586 " plugin.docs" ,
@@ -108,6 +109,7 @@ function M.update(opts)
108109 opts = M .opts (opts , { mode = " update" })
109110 return M .run ({
110111 pipeline = {
112+ " plugin.exists" ,
111113 " git.origin" ,
112114 " git.branch" ,
113115 " git.fetch" ,
@@ -147,6 +149,7 @@ function M.check(opts)
147149 opts = opts or {}
148150 return M .run ({
149151 pipeline = {
152+ " plugin.exists" ,
150153 { " git.origin" , check = true },
151154 " git.fetch" ,
152155 " git.status" ,
Original file line number Diff line number Diff line change @@ -97,4 +97,15 @@ M.docs = {
9797 end ,
9898}
9999
100+ M .exists = {
101+ skip = function (plugin )
102+ return not plugin ._ .is_local
103+ end ,
104+ run = function (self )
105+ if not Util .file_exists (self .plugin .dir ) then
106+ self :error (" Local plugin does not exist at `" .. self .plugin .dir .. " `" )
107+ end
108+ end ,
109+ }
110+
100111return M
You can’t perform that action at this time.
0 commit comments