mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-07 02:37:28 +08:00
feat: harden jsonl runtime reliability
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
clawgoassets "github.com/YspCoder/clawgo"
|
||||
"github.com/YspCoder/clawgo/pkg/config"
|
||||
)
|
||||
|
||||
@@ -42,7 +43,7 @@ func copyEmbeddedToTarget(targetDir string, overwrite func(relPath string) bool)
|
||||
return fmt.Errorf("failed to create target directory: %w", err)
|
||||
}
|
||||
|
||||
return fs.WalkDir(embeddedFiles, "workspace", func(path string, d fs.DirEntry, err error) error {
|
||||
return fs.WalkDir(clawgoassets.WorkspaceTemplates, "workspace", func(path string, d fs.DirEntry, err error) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -50,7 +51,7 @@ func copyEmbeddedToTarget(targetDir string, overwrite func(relPath string) bool)
|
||||
return nil
|
||||
}
|
||||
|
||||
data, err := embeddedFiles.ReadFile(path)
|
||||
data, err := clawgoassets.WorkspaceTemplates.ReadFile(path)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to read embedded file %s: %w", path, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user