MCPcopy
hub / github.com/cli/cli / isAccessDenied

Function isAccessDenied

script/build.go:187–191  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

185}
186
187func isAccessDenied(err error) bool {
188 var pe *os.PathError
189 // we would use `syscall.ERROR_ACCESS_DENIED` if this script supported build tags
190 return errors.As(err, &pe) && strings.Contains(pe.Err.Error(), "Access is denied")
191}
192
193func rmrf(targets ...string) error {
194 args := append([]string{"rm", "-rf"}, targets...)

Callers 1

sourceFilesLaterThanFunction · 0.85

Calls 2

ContainsMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected