Skip to content

Raise an error if email set to "" #132

@MarkEdmondson1234

Description

@MarkEdmondson1234

In a non-interactive environment, it is recommended to supply option("gargle_oauth_email") to TRUE or an email so avoid the interactive menu. Setting this option via a Sys.getenv() call can be convenient for multiple users.

However, if the environment argument is not set Sys.getenv() returns "" which is not raised as an error in token_fetch() or otherwise:

token_fetch(email = Sys.getenv("NOT_SET"))
#The gargle package is requesting access to your Google account. Select a pre-authorised account or enter '0' to obtain a new token. Press Esc/Ctrl + C to abort.

If the function checked for a valid email (something simple like checking it has a @ present would help) then downstream errors will be easier and more informative.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions