Skip to content

Commit e9c346c

Browse files
committed
Wrap fishy file checks in a try()
1 parent 1fa6210 commit e9c346c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

R/git-default-branch.R

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -532,9 +532,13 @@ report_fishy_files <- function(old_name = "master", new_name = "main") {
532532
ui_todo("
533533
Be sure to update files that refer to the default branch by name.
534534
Consider searching within your project for {ui_value(old_name)}.")
535-
fishy_github_actions(new_name = new_name)
536-
fishy_badges(old_name = old_name)
537-
fishy_bookdown_config(old_name = old_name)
535+
# I don't want failure of a fishy file check to EVER cause
536+
# git_default_branch_rename() to fail and prevent the call to
537+
# git_default_branch_rediscover()
538+
# using a simple try() wrapper because these hints are just "nice to have"
539+
try(fishy_github_actions(new_name = new_name), silent = TRUE)
540+
try(fishy_badges(old_name = old_name), silent = TRUE)
541+
try(fishy_bookdown_config(old_name = old_name), silent = TRUE)
538542
}
539543

540544
# good test cases: downlit, purrr, pkgbuild, zealot, glue, bench,

0 commit comments

Comments
 (0)