chore: update repo sync apth

This commit is contained in:
duorameng
2026-05-08 12:02:12 +08:00
parent b412941983
commit df7cba97a8
+2 -4
View File
@@ -130,10 +130,8 @@ func ParseRepoScriptsAndAddCron(taskID string, logWriter io.Writer, forceComment
displayPath := path
displayWorkDir := targetPath
if strings.HasPrefix(absPath, absScriptsDir) {
displayPath = filepath.ToSlash(filepath.Join("$SCRIPTS_DIR$", relPath))
// 获取目录路径
relDir, _ := filepath.Rel(absScriptsDir, filepath.Dir(absPath))
displayWorkDir = filepath.ToSlash(filepath.Join("$SCRIPTS_DIR$", relDir))
displayPath = filepath.ToSlash(relPath)
displayWorkDir = "$SCRIPTS_DIR$"
}
// 找到任务,进行保存