Proposal: auto-fallback to ~/.mapbox-cli when ~/.mapbox is blocked
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust
- Domain
- authentication, cli
Research direction
Read the follow-up context in issue #28, then locate the CLI's configuration-directory and credential-store path selection, including handling for MAPBOX_CONFIG_DIR and MAPBOX_ACCESS_TOKEN. Done means the stated preference order is preserved, blocked ~/.mapbox cases use ~/.mapbox-cli without reading the legacy file as a token, and the both-valid case is reported.
Written by the indexing model from the issue text.
Description
Follow-up from #28
Idea: when the program can solve a problem, it should — not the user.
~/.mapbox can be a leftover file, not a directory. Today the CLI asks the user to move it by hand. Proposal: fall back to ~/.mapbox-cli automatically instead.
Order matters. If we just pick whichever path is free, this trap appears: login while ~/.mapbox is blocked → credentials go to ~/.mapbox-cli. User later deletes the stray file. Next run sees ~/.mapbox free, uses it, and the user looks logged out — credentials stranded in ~/.mapbox-cli.
So: prefer whichever directory already holds a valid credential store, not whichever is free.
~/.mapboxhas a valid store → use it.- Else
~/.mapbox-clihas a valid store → use it. - Else (neither set up yet) → default to
~/.mapboxif usable, else~/.mapbox-cli. - Both valid (edge case) →
~/.mapboxwins, and the CLI says so.
Do not read the legacy file's contents as a token. Unlike MAPBOX_ACCESS_TOKEN, the user never gave it to us on purpose — it could be stale or from another tool.
MAPBOX_CONFIG_DIR stays as-is: an explicit override, no fallback.
- Dominant language
- Rust
- Stars
- 15
- Forks
- 2
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
A-UI C-Bug S-Needs-Triage
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
bevyengine/bevy#26330 ·
Maintainers usually reply within 2 days
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
chipsalliance/caliptra-sw#4335 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
aaif-goose/goose#13158 ·
Maintainers usually reply within 1 day
-
agent enhancement provider:anthropic providers triaged
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
can1357/oh-my-pi#17148 · 1 comment ·
Maintainers usually reply within 1 day
-
A-documentation good first issue
Difficulty 1/5 Under an hour Newbie friendliness 82/100
rust-lang/rust-clippy#17926 · 1 comment ·
Maintainers usually reply within 1 day