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

Method ValidateInstallsOnSystem

internal/devpkg/validation.go:32–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30}
31
32func (p *Package) ValidateInstallsOnSystem() (bool, error) {
33 u, err := p.urlForInstall()
34 if err != nil {
35 return false, err
36 }
37 info, _ := nix.Search(u)
38 if len(info) == 0 {
39 return false, nil
40 }
41 if out, err := nix.Eval(u); err != nil &&
42 strings.Contains(string(out), "is not available on the requested hostPlatform") {
43 return false, nil
44 }
45 // There's other stuff that may cause this evaluation to fail, but we don't
46 // want to handle all of them here. (e.g. unfree packages)
47 return true, nil
48}

Callers

nothing calls this directly

Calls 3

urlForInstallMethod · 0.95
SearchFunction · 0.92
EvalFunction · 0.92

Tested by

no test coverage detected