Hacktoberfest 2026 : les issues que les mainteneurs ont marquées pour octobre, ouvertes et accessibles aux débutants. Parcourir les issues Hacktoberfest

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

Ouverte
#30 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
52/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
rust
Domaine
authentication, cli

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Rust
Étoiles
7
Forks
0
Merge moyen
9 h 52 min
PR mergées (30 j)
27

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.