This commit is contained in:
1-6
2023-07-25 09:54:02 +08:00
parent e5163b233a
commit 1b9311c5e6
2 changed files with 30 additions and 28 deletions
+2
View File
@@ -36,6 +36,7 @@ var languages = []Language{
func init() { func init() {
go func() {
for _, item := range languages { for _, item := range languages {
if !(item.Os == runtime.GOOS && item.Arch == runtime.GOARCH) { if !(item.Os == runtime.GOOS && item.Arch == runtime.GOARCH) {
continue continue
@@ -64,4 +65,5 @@ func init() {
os.WriteFile(dir+"/version", []byte(item.Version), 0755) os.WriteFile(dir+"/version", []byte(item.Version), 0755)
}() }()
} }
}()
} }
+1 -1
View File
@@ -31,7 +31,7 @@ func initNodePlugins() {
plugins := []string{root} plugins := []string{root}
os.Mkdir(root, 0755) os.Mkdir(root, 0755)
filepath.Walk(root, func(path string, info os.FileInfo, err error) error { filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
if !strings.HasPrefix(path, "/Users/a1-6/Code/sillyplus/plugins/") { if !strings.HasPrefix(path, utils.ExecPath+"/plugins/") {
return nil return nil
} }
files := strings.Split(strings.Replace(path, root+"/", "", 1), "/") files := strings.Split(strings.Replace(path, root+"/", "", 1), "/")