digitalocean / digitalocean/doctl

--access-token flag ignored when also providing --context flag

Open
#1,394 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Go
Stars
3.4k
Forks
496
Avg merge
1d 2h
Merged PRs (30d)
31

Description

**Describe the Issue:**

I am attempting to create an auth context with a custom name, with a token from my env vars.

If I use…

```shell
$ doctl auth init --access-token "${DIGITALOCEAN_TOKEN}"
```

… it works just fine, but if I use…

```shell
$ doctl auth init --access-token "${DIGITALOCEAN_TOKEN}" --context=another
```

if prompts for my access token.

**Environment:**
- doctl version: doctl version 1.97.1-release
- OS: MacOS 13.2.1 (22D68)
- Installation method: Homebrew

**Additional Details:**

No trace to provide as it's not making any requests

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.