Skip to content

'reset' gcloud_account()? #70

@mtmorgan

Description

@mtmorgan

From @shbrief gcloud_account() or gcloud_account(account = NULL) returns the current account, gcloud_account(account = "xxx") sets the account to xxx. How to reset to original (when package started) value?

A workaround is to record the original value

original_account <- gcloud_account()

then do work and at some point

gcloud_account(original_account)

This could be automated, so that for instance gcloud_account(account = NA) resets the value to the account at the beginning of the R session (when the AnVIL package was loaded?) but is this consistent with the workflow that is desired to be supported? If this were to be in a package, then the package could implement this with

gcloud_account_value <- NULL

.onLoad <- function(...) {
    gcloud_account_value <<- gcloud_account()
}

gcloud_account_reset <- function() {
    gcloud_accoutn(gcloud_account_value)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions