Proposal: auto-fallback to ~/.mapbox-cli when ~/.mapbox is blocked
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- authentication, cli
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Rust
- Stelle
- 7
- Fork
- 0
- Merge medio
- 9h 52m
- PR unite (30g)
- 27
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Issue simili
-
Replayed reasoning items send "content": null, which the Responses API schema does not permit Apertabug CLI custom-model
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
fulcrumgenomics/ferro-hgvs#2251 ·
-
A-allocators A-docs C-enhancement T-libs
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100