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

Function readStateHashFile

internal/lock/statehash.go:74–84  ·  view source on GitHub ↗
(projectDir string)

Source from the content-addressed store, hash-verified

72}
73
74func readStateHashFile(projectDir string) (*stateHashFile, error) {
75 hashFile := &stateHashFile{}
76 err := cuecfg.ParseFile(stateHashFilePath(projectDir), hashFile)
77 if errors.Is(err, fs.ErrNotExist) {
78 return hashFile, nil
79 }
80 if err != nil {
81 return nil, err
82 }
83 return hashFile, nil
84}
85
86func getCurrentStateHash(args UpdateStateHashFileArgs) (*stateHashFile, error) {
87 nixHash, err := manifestHash(args.ProjectDir)

Callers 1

isStateUpToDateFunction · 0.85

Calls 3

ParseFileFunction · 0.92
stateHashFilePathFunction · 0.85
IsMethod · 0.80

Tested by

no test coverage detected