Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion R/publish.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,19 @@ publish_book = function(name = NULL, ...) {
# if no accounts other than shinyapps.io and bookdown.org have been set up on
# this machine, offer to add one for connect.posit.cloud
if (length(setdiff(accounts$server, c('shinyapps.io', 'bookdown.org'))) == 0) {
if (readline('Do you want to connect to connect.posit.cloud? (y/n)') == 'y')
if (readline('Do you want to connect to connect.posit.cloud? (y/n)') == 'y') {
# due to https://github.com/rstudio/rsconnect/pull/1266 we need to install RCurl for rsconnect <= 1.6.2
if (!xfun::pkg_available("rsconnect", "1.6.3") && !xfun::pkg_available("RCurl")) {
msg = 'The RCurl package is not installed but required for Connect Cloud auth flow.'
if (readline(
paste0(msg, '\nDo you want to install RCurl now? (y/n) ')) == 'y') {
install.packages('RCurl')
} else {
stop(msg, ' Please install the RCurl package. Then run rsconnect::connectCloudUser().')
}
}
rsconnect::connectCloudUser()
}
}

# deploy the book
Expand Down
Loading