Proposal: auto-fallback to ~/.mapbox-cli when ~/.mapbox is blocked
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
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.
- 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
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Issues similaires
-
Replayed reasoning items send "content": null, which the Responses API schema does not permit Ouvertebug CLI custom-model
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
rust-bitcoin/rust-bitcoin#6930 · 1 commentaire ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
fulcrumgenomics/ferro-hgvs#2251 ·
-
Missing examples for `Allocator` OuverteA-allocators A-docs C-enhancement T-libs
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100