getLocalFlakesDirs searches packages and returns list of directories of local flakes that are mentioned in config. e.g., path:./my-flake#packageName -> ./my-flakes
()
| 11 | // of local flakes that are mentioned in config. |
| 12 | // e.g., path:./my-flake#packageName -> ./my-flakes |
| 13 | func (d *Devbox) getLocalFlakesDirs() []string { |
| 14 | localFlakeDirs := []string{} |
| 15 | |
| 16 | // searching through installed packages to get location of local flakes |
| 17 | for _, pkg := range d.AllPackageNamesIncludingRemovedTriggerPackages() { |
| 18 | // filtering local flakes packages |
| 19 | if strings.HasPrefix(pkg, "path:") { |
| 20 | pkgDirAndName, _ := strings.CutPrefix(pkg, "path:") |
| 21 | pkgDir := strings.Split(pkgDirAndName, "#")[0] |
| 22 | localFlakeDirs = append(localFlakeDirs, pkgDir) |
| 23 | } |
| 24 | } |
| 25 | return localFlakeDirs |
| 26 | } |
no test coverage detected