fix updateAzureActiveContext when passed NULL value
This commit is contained in:
Родитель
3db3fb8408
Коммит
4fd9867724
16
R/internal.R
16
R/internal.R
|
@ -165,12 +165,14 @@ refreshStorageKey <- function(azureActiveContext, storageAccount, resourceGroup)
|
|||
|
||||
updateAzureActiveContext <- function(x, storageAccount, storageKey, resourceGroup, container, blob, directory) {
|
||||
# updates the active azure context in place
|
||||
assert_that(is.azureActiveContext(x))
|
||||
if (!missing(storageAccount)) x$storageAccount <- storageAccount
|
||||
if (!missing(resourceGroup)) x$resourceGroup <- resourceGroup
|
||||
if (!missing(storageKey)) x$storageKey <- storageKey
|
||||
if (!missing(container)) x$container <- container
|
||||
if (!missing(blob)) x$blob <- blob
|
||||
if (!missing(directory)) x$directory <- directory
|
||||
if (!is.null(x)) {
|
||||
assert_that(is.azureActiveContext(x))
|
||||
if (!missing(storageAccount)) x$storageAccount <- storageAccount
|
||||
if (!missing(resourceGroup)) x$resourceGroup <- resourceGroup
|
||||
if (!missing(storageKey)) x$storageKey <- storageKey
|
||||
if (!missing(container)) x$container <- container
|
||||
if (!missing(blob)) x$blob <- blob
|
||||
if (!missing(directory)) x$directory <- directory
|
||||
}
|
||||
TRUE
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче