Skip to content

Commit

Permalink
Merged origin/main into debug-check-boards
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasilge committed Aug 10, 2023
2 parents b3780f6 + ff30f59 commit 05160db
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Imports:
jsonlite,
lifecycle,
magrittr,
purrr,
purrr (>= 1.0.0),
rappdirs,
rlang (>= 1.1.0),
tibble,
Expand Down
5 changes: 4 additions & 1 deletion R/board_gdrive.R
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,13 @@ required_pkgs.pins_board_gdrive <- function(x, ...) {

# Helpers -----------------------------------------------------------------

possibly_drive_ls <- function(...) {
tryCatch(googledrive::drive_ls(...), error = function(err) NULL)
}

gdrive_file_exists <- function(board, name) {
path <- fs::path(board$dribble$name, fs::path_dir(name))
name <- fs::path_file(name)
possibly_drive_ls <- purrr::possibly(googledrive::drive_ls)
all_names <- possibly_drive_ls(path)
name %in% all_names$name
}
Expand Down
4 changes: 3 additions & 1 deletion R/pin-meta.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ pin_meta <- function(board, name, version = NULL, ...) {
UseMethod("pin_meta")
}

possibly_pin_meta <- possibly(pin_meta)
possibly_pin_meta <- function(...) {
tryCatch(pin_meta(...), error = function(err) NULL)
}

multi_meta <- function(board, names) {
meta <- map(names, possibly(pin_meta, empty_local_meta), board = board)
Expand Down

0 comments on commit 05160db

Please sign in to comment.