-
Notifications
You must be signed in to change notification settings - Fork 551
Closed
Labels
Description
From the README: https://github.com/googleworkspace/cli?tab=readme-ov-file#multiple-accounts
gws auth login --account work@corp.com # login and register an account
gws auth login --account personal@gmail.com
gws auth list # list registered accounts
gws auth default work@corp.com. # set the default
gws --account personal@gmail.com drive files list # one-off override
export GOOGLE_WORKSPACE_CLI_ACCOUNT=personal@gmail.com # env var override
I'm logged into 2 accounts:
$ gws auth list
{
"accounts": [
{
...
},
{
...
}
],
"count": 2,
"default": "..."
}
But running gws --account <non-default-acct> drive files list fails with:
{
"error": {
"code": 400,
"message": "error: unrecognized subcommand '<non-default-email>'\n\nUsage: gws [OPTIONS] <COMMAND>\n\nFor more information, try '--help'.\n",
"reason": "validationError"
}
}
Not specific to drive, you can try with any subcomment. Even gws --account <something> fails.
Reactions are currently unavailable