Skip to content

Commit

Permalink
Retry GH package upload on error
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Mar 19, 2024
1 parent e0ab6cc commit 54b624c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/gh-repo.R
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,13 @@ ghrepo <- local({
ghr$create(slug, ver)
}
cli::cli_alert_info("Adding release asset for {slug} {ver}.")
ghr$add_asset(slug, inst$built_path[i], ver)
tryCatch(
ghr$add_asset(slug, inst$built_path[i], ver),
error = function(err) {
cli::cli_alert_info("Try adding release asset again.")
ghr$add_asset(slug, inst$built_path[i], ver),
}
)
}
}

Expand Down

0 comments on commit 54b624c

Please sign in to comment.