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

Method InputAddressedPathForOutput

internal/devpkg/package.go:604–624  ·  view source on GitHub ↗
(output string)

Source from the content-addressed store, hash-verified

602}
603
604func (p *Package) InputAddressedPathForOutput(output string) (string, error) {
605 if inCache, err := p.IsInBinaryCache(); err != nil {
606 return "", err
607 } else if !inCache {
608 return "",
609 errors.Errorf("Package %q cannot be fetched from binary cache store", p.Raw)
610 }
611
612 entry, err := p.lockfile.Resolve(p.LockfileKey())
613 if err != nil {
614 return "", err
615 }
616
617 sysInfo := entry.Systems[nix.System()]
618 for _, out := range sysInfo.Outputs {
619 if out.Name == output {
620 return out.Path, nil
621 }
622 }
623 return "", errors.Errorf("Output %q not found for package %q", output, p.Raw)
624}
625
626func (p *Package) HasAllowInsecure() bool {
627 return len(p.AllowInsecure) > 0

Callers 2

InstallableForOutputMethod · 0.95
InputAddressedPathsMethod · 0.95

Calls 4

IsInBinaryCacheMethod · 0.95
LockfileKeyMethod · 0.95
SystemFunction · 0.92
ResolveMethod · 0.65

Tested by

no test coverage detected