Skip to content

Commit

Permalink
check windows NA response
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbarbone committed Dec 3, 2024
1 parent 22a6f74 commit b9887aa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/clipboard.R
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ read_clipboard <- function(method = read_clipboard_methods(), ...) {
}

clipr_read_clip <- function(...) {
withCallingHandlers(
res <- withCallingHandlers(
clipr::read_clip(...),
simpleWarning = function(e) {
if (grepl(
Expand All @@ -127,6 +127,12 @@ clipr_read_clip <- function(...) {
}
}
)

Check warning on line 130 in R/clipboard.R

View workflow job for this annotation

GitHub Actions / lint

file=R/clipboard.R,line=130,col=1,[trailing_whitespace_linter] Trailing whitespace is superfluous.
if (is_windows() && isNA(res)) {
NULL
} else {
res
}
}

#' @export
Expand Down

0 comments on commit b9887aa

Please sign in to comment.