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

Method ValidateExists

internal/devpkg/validation.go:11–30  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

9)
10
11func (p *Package) ValidateExists(ctx context.Context) (bool, error) {
12 if p.IsRunX() {
13 _, err := p.lockfile.Resolve(p.Raw)
14 return err == nil, err
15 }
16 if p.isVersioned() && p.version() == "" {
17 return false, usererr.New("No version specified for %q.", p.Raw)
18 }
19
20 inCache, err := p.IsInBinaryCache()
21 if err != nil {
22 return false, err
23 }
24 if inCache {
25 return true, nil
26 }
27
28 info, err := p.NormalizedPackageAttributePath()
29 return info != "", err
30}
31
32func (p *Package) ValidateInstallsOnSystem() (bool, error) {
33 u, err := p.urlForInstall()

Callers 1

AddMethod · 0.80

Calls 7

IsRunXMethod · 0.95
isVersionedMethod · 0.95
versionMethod · 0.95
IsInBinaryCacheMethod · 0.95
NewFunction · 0.92
ResolveMethod · 0.65

Tested by

no test coverage detected