MCPcopy
hub / github.com/go-task/task / ChecksumPrompt

Method ChecksumPrompt

taskfile/node_cache.go:76–91  ·  view source on GitHub ↗
(checksum string)

Source from the content-addressed store, hash-verified

74}
75
76func (node *CacheNode) ChecksumPrompt(checksum string) string {
77 cachedChecksum := node.ReadChecksum()
78 switch {
79
80 // If the checksum doesn't exist, prompt the user to continue
81 case cachedChecksum == "":
82 return taskfileUntrustedPrompt
83
84 // If there is a cached hash, but it doesn't match the expected hash, prompt the user to continue
85 case cachedChecksum != checksum:
86 return taskfileChangedPrompt
87
88 default:
89 return ""
90 }
91}
92
93func (node *CacheNode) Location() string {
94 return node.filePath("yaml")

Callers 1

readRemoteNodeContentMethod · 0.95

Calls 1

ReadChecksumMethod · 0.95

Tested by

no test coverage detected