(resourceDir, path string)
| 687 | updated.BundledSkillsDir = bundledSkillsDir |
| 688 | updated.IsolatedSkillsOnly = isolatedSkillsOnly |
| 689 | ApplyHarnessDefaults(&updated) |
| 690 | return updated |
| 691 | } |
| 692 | |
| 693 | func ProjectRuntimeName(projectRoot string) string { |
| 694 | paths, err := apppaths.ResolveCurrent() |
| 695 | if err == nil { |
| 696 | discovered, discoverErr := apppaths.DiscoverProjectRoot(projectRoot, []string{".git"}) |
| 697 | if discoverErr == nil { |
| 698 | projectRoot = discovered |
| 699 | } |
| 700 | if project, projectErr := paths.ForProject(projectRoot); projectErr == nil { |
| 701 | return project.ID |
| 702 | } |
| 703 | } |
| 704 | return LegacyProjectRuntimeName(projectRoot) |
| 705 | } |
| 706 | |
| 707 | func LegacyProjectRuntimeName(projectRoot string) string { |
| 708 | name := filepath.Base(filepath.Clean(projectRoot)) |
| 709 | name = strings.TrimSpace(name) |
| 710 | if name == "." || name == string(filepath.Separator) || name == "" { |
| 711 | name = "default" |
| 712 | } |
no test coverage detected