(err error)
| 211 | } |
| 212 | |
| 213 | func 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 | |
| 219 | func rmrf(targets ...string) error { |
| 220 | args := append([]string{"rm", "-rf"}, targets...) |
no test coverage detected