Proposal: auto-fallback to ~/.mapbox-cli when ~/.mapbox is blocked
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 52/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- rust
- Domínio
- authentication, cli
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- Rust
- Estrelas
- 7
- Forks
- 0
- Merge médio
- 9h 52min
- PRs com merge (30d)
- 27
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
TheLarkInn/aipm#2413 ·
-
documentation
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
alexgorbatchev/simple-ptt#15 ·
-
tooling
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
todo:ticket
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
taikoxyz/taiko-mono#22168 · 1 comentário ·