(err error)
| 185 | } |
| 186 | |
| 187 | func 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 | |
| 193 | func rmrf(targets ...string) error { |
| 194 | args := append([]string{"rm", "-rf"}, targets...) |
no test coverage detected