MCPcopy Create free account
hub / github.com/cli/cli / isAccessDenied

Function isAccessDenied

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

Source from the content-addressed store, hash-verified

211}
212
213func isAccessDenied(err error) bool {
214 var pe *os.PathError
215 // we would use `syscall.ERROR_ACCESS_DENIED` if this script supported build tags
216 return errors.As(err, &pe) && strings.Contains(pe.Err.Error(), "Access is denied")
217}
218
219func rmrf(targets ...string) error {
220 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