2 parents 860ff25 + 1ae6833 commit 86c461aCopy full SHA for 86c461a
1 file changed
R/remotes.R
@@ -81,6 +81,13 @@ git_remote_set_pushurl <- function(
81
if (!length(remote)) {
82
remote <- git_info(repo = repo)$remote
83
}
84
+ if (!length(remote) || is.na(remote)) {
85
+ stop("No remote specified and none could be detected", call. = FALSE)
86
+ }
87
+ existing <- git_remote_list(repo = repo)$name
88
+ if (!remote %in% existing) {
89
+ stop(sprintf("remote '%s' does not exist", remote), call. = FALSE)
90
91
url <- as.character(url)
92
93
git_config_set(
0 commit comments