MCPcopy Index your code
hub / github.com/jetify-com/devbox / getLocalFlakesDirs

Method getLocalFlakesDirs

internal/devbox/flakes.go:13–26  ·  view source on GitHub ↗

getLocalFlakesDirs searches packages and returns list of directories of local flakes that are mentioned in config. e.g., path:./my-flake#packageName -> ./my-flakes

()

Source from the content-addressed store, hash-verified

11// of local flakes that are mentioned in config.
12// e.g., path:./my-flake#packageName -> ./my-flakes
13func (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}

Callers 2

GenerateDevcontainerMethod · 0.95
GenerateDockerfileMethod · 0.95

Tested by

no test coverage detected