-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
34 lines (26 loc) · 1.17 KB
/
errors.go
File metadata and controls
34 lines (26 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package pin
import "errors"
// Sentinel errors for branching with errors.Is.
//
// CLI exit-code mapping:
//
// ErrFrozenDrift, ErrVerifyFailed → exit 4
// ErrProvenanceMissing, ErrPublisherMismatch → exit 4
// OutdatedExitCode handles yanked / behind / deprecated → 7 or 9
var (
ErrNoLockfile = errors.New("no lockfile; run sync first")
ErrFrozenDrift = errors.New("manifest and lockfile disagree")
ErrVerifyFailed = errors.New("verify failed")
ErrProvenanceMissing = errors.New("no attestation recorded")
// ErrPublisherMismatch fires when the attestation's
// source_repository does not match the package's declared
// repository.url and no trusted_workflows entry matches.
ErrPublisherMismatch = errors.New("attestation source repository mismatch")
ErrPathEscape = errors.New("output path escapes out directory")
// ErrPathCollision fires when two resolved assets in the same
// Sync produce the same on-disk Out. Most common under
// layout: flat when two packages or two files within one entry
// share a basename. pin fails closed rather than silently
// overwriting.
ErrPathCollision = errors.New("two assets resolve to the same output path")
)