File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 5
5
"path/filepath"
6
6
"strings"
7
7
8
+ "github.com/gvcgo/goutils/pkgs/gtea/gprint"
8
9
"github.com/gvcgo/goutils/pkgs/gutils"
9
10
"github.com/gvcgo/version-manager/internal/cnf"
10
11
"github.com/gvcgo/version-manager/internal/luapi/lua_global"
@@ -36,7 +37,9 @@ func NewPlugins() *Plugins {
36
37
}
37
38
38
39
func (p * Plugins ) Update () {
39
- UpdatePlugins ()
40
+ if err := UpdatePlugins (); err != nil {
41
+ gprint .PrintError ("update plugins failed: %s" , err )
42
+ }
40
43
}
41
44
42
45
func (p * Plugins ) LoadAll () {
@@ -56,7 +59,9 @@ func (p *Plugins) LoadAll() {
56
59
}
57
60
ll := lua_global .NewLua ()
58
61
L := ll .L
59
- L .DoFile (filepath .Join (pDir , f .Name ()))
62
+ if err := L .DoFile (filepath .Join (pDir , f .Name ())); err != nil {
63
+ continue
64
+ }
60
65
pl .PluginName = GetConfItemFromLua (L , PluginName )
61
66
if pl .PluginName == "" {
62
67
continue
You can’t perform that action at this time.
0 commit comments