Skip to content

Commit

Permalink
fix account discovery by showProperties
Browse files Browse the repository at this point in the history
fixes #980
  • Loading branch information
aronatkins committed Aug 31, 2023
1 parent c46bf29 commit 02e3754
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 18 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
`Applications.ManifestEnvironmentManagementSelection = false`.
Requires Posit Connect `>=2023.07.0`. (#977)

* Fix account discovery by `showProperties()`. (#980)

# rsconnect 1.0.2

* Fixed redeployments to shinyapps.io where `appName` is provided, but no local
Expand Down
20 changes: 8 additions & 12 deletions R/configureApp.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ configureApp <- function(appName, appDir = getwd(), account = NULL, server = NUL
#'
#' Set a property on currently deployed ShinyApps application.
#'
#' @param propertyName Name of property to set
#' @param propertyValue Nalue to set property to
#' @param propertyName Name of property
#' @param propertyValue Property value
#' @param appName Name of application
#' @param appPath Directory or file that was deployed. Defaults to current
#' working directory.
Expand Down Expand Up @@ -124,11 +124,7 @@ setProperty <- function(propertyName, propertyValue, appPath = getwd(),
#' Unset a property on currently deployed ShinyApps application (restoring to
#' its default value)
#'
#' @param propertyName Name of property to unset
#' @param appName Name of application
#' @param appPath Directory or file that was deployed. Defaults to current
#' working directory.
#' @inheritParams deployApp
#' @inheritParams setProperty
#' @param force Forcibly unset the property
#'
#' @note This function only works for ShinyApps servers.
Expand Down Expand Up @@ -172,20 +168,20 @@ unsetProperty <- function(propertyName, appPath = getwd(), appName = NULL,
#' @param appName Name of application
#' @param appPath Directory or file that was deployed. Defaults to current
#' working directory.
#' @param account Account name. If a single account is registered on the
#' system then this parameter can be omitted.
#' @inheritParams deployApp
#'
#' @note This function works only for ShinyApps servers.
#'
#' @export
showProperties <- function(appPath = getwd(), appName = NULL, account = NULL) {
showProperties <- function(appPath = getwd(), appName = NULL, account = NULL, server = NULL) {

deployment <- findDeployment(
appPath = appPath,
appName = appName,
account = account
account = account,
server = server
)
accountDetails <- accountInfo(deployment$account)
accountDetails <- accountInfo(deployment$account, deployment$server)
client <- clientForAccount(accountDetails)
application <- getAppByName(client, accountDetails, deployment$name)
if (is.null(application))
Expand Down
4 changes: 2 additions & 2 deletions man/setProperty.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 11 additions & 3 deletions man/showProperties.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/unsetProperty.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 02e3754

Please sign in to comment.