Skip to content

Commit 0d3cb3d

Browse files
committed
Temporary arrangement to capture an error specimen
1 parent 4aa55e7 commit 0d3cb3d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

R/pr.R

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,15 @@ pr_clean <- function(
625625
ui_bullets(c(
626626
"v" = "Deleting local {.val {pr_local_branch}} branch."
627627
))
628-
gert::git_branch_delete(pr_local_branch, repo = repo)
628+
tryCatch(
629+
gert::git_branch_delete(pr_local_branch, repo = repo),
630+
error = function(e) {
631+
saveRDS(e, "~/rrr/usethis/oops.rds")
632+
ui_bullets(c(
633+
"!" = "Wrote an error from git_branch_delete() to oops.rds!"
634+
))
635+
}
636+
)
629637
}
630638

631639
if (is.null(pr)) {

oops.rds

230 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)