File tree 3 files changed +15
-0
lines changed
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()
243
243
else
244
244
plugin ._ .is_local = true
245
245
plugin ._ .installed = true -- local plugins are managed by the user
246
+ plugin ._ .installed = vim .fn .isdirectory (plugin .dir ) == 1
246
247
end
247
248
end
248
249
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ function M.install(opts)
80
80
opts = M .opts (opts , { mode = " install" })
81
81
return M .run ({
82
82
pipeline = {
83
+ " plugin.exists" ,
83
84
" git.clone" ,
84
85
{ " git.checkout" , lockfile = opts .lockfile },
85
86
" plugin.docs" ,
@@ -108,6 +109,7 @@ function M.update(opts)
108
109
opts = M .opts (opts , { mode = " update" })
109
110
return M .run ({
110
111
pipeline = {
112
+ " plugin.exists" ,
111
113
" git.origin" ,
112
114
" git.branch" ,
113
115
" git.fetch" ,
@@ -147,6 +149,7 @@ function M.check(opts)
147
149
opts = opts or {}
148
150
return M .run ({
149
151
pipeline = {
152
+ " plugin.exists" ,
150
153
{ " git.origin" , check = true },
151
154
" git.fetch" ,
152
155
" git.status" ,
Original file line number Diff line number Diff line change @@ -97,4 +97,15 @@ M.docs = {
97
97
end ,
98
98
}
99
99
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
+
100
111
return M
You can’t perform that action at this time.
0 commit comments