Proposal: auto-fallback to ~/.mapbox-cli when ~/.mapbox is blocked
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 52/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- rust
- 領域
- authentication, cli
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Rust
- 星號
- 13
- 分支
- 1
- 平均合併
- 2 天 4 小時
- 30 天內合併 PR
- 66
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
mapbox/mapbox-cli 的其他 Issue
-
enhancement
難度 4/5 3-5 天 新手友好度 66/100
mapbox/mapbox-cli#75 · 1 則留言 ·
維護者通常 1 天內回覆
-
enhancement
難度 4/5 3-5 天 新手友好度 58/100
mapbox/mapbox-cli#74 · 1 則留言 ·
維護者通常 1 天內回覆
查看 mapbox/mapbox-cli 的全部 Issue
相似的 Issue
-
state:triage-needed
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 1 天內回覆
-
docs(skills): issue-first should reference an existing Linear ticket instead of filing a duplicate未關閉documentation
難度 1/5 1-3 小時 新手友好度 74/100
維護者通常 1 天內回覆
-
area: tui good first issue help wanted type: bug
難度 2/5 1-3 小時 新手友好度 72/100
srothgan/claude-code-rust#473 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
storytold/photocraft#5260 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆