(output string)
| 602 | } |
| 603 | |
| 604 | func (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 | |
| 626 | func (p *Package) HasAllowInsecure() bool { |
| 627 | return len(p.AllowInsecure) > 0 |
no test coverage detected