restoreBackup undoes a partial swap by removing any freshly installed entries and moving the original entries back from backup into dest.
(dest, backup string, movedOut, movedIn []string)
| 563 | // restoreBackup undoes a partial swap by removing any freshly installed |
| 564 | // entries and moving the original entries back from backup into dest. |
| 565 | func restoreBackup(dest, backup string, movedOut, movedIn []string) { |
| 566 | for _, name := range movedIn { |
| 567 | _ = os.RemoveAll(filepath.Join(dest, name)) |
| 568 | } |
| 569 | for _, name := range movedOut { |
| 570 | _ = os.Rename(filepath.Join(backup, name), filepath.Join(dest, name)) |
| 571 | } |
| 572 | _ = os.RemoveAll(backup) |
| 573 | } |
| 574 | |
| 575 | // scanAllAgents walks every registered agent's skill directory (project + user scope) and |
| 576 | // collects installed skills. Shared install roots are scanned only once. |
no test coverage detected