Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Proposal: auto-fallback to ~/.mapbox-cli when ~/.mapbox is blocked

Aperta
#30 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

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

enhancement

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.

  1. ~/.mapbox has a valid store → use it.
  2. Else ~/.mapbox-cli has a valid store → use it.
  3. Else (neither set up yet) → default to ~/.mapbox if usable, else ~/.mapbox-cli.
  4. Both valid (edge case) → ~/.mapbox wins, 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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.