usage 0.29.19
新功能 1 項
Homebrew 安裝後,設定狀態列不再走錯路
你用 Homebrew 安裝 Usage,卻看到「跑 python3 main.py --setup」時,現在不會再被帶進死巷。Homebrew(macOS 的套件安裝工具)裝的是應用程式,沒有原始碼資料夾;以前畫面下方的提示仍叫你照原始碼使用者的方式跑指令。你若翻進應用程式包裡執行 main.py,還會撞上看似無關的 ImportError,因為它必須由 py2app(把 Python 程式包成 macOS App 的工具)隨附的解譯器啟動。現在兩種提示都改指向「Set Up Status Line」按鈕,按一下就能設定顯示在終端機最底下的狀態列;直接誤跑內附的 main.py 時,也會明說為何不能這樣開。像買了組裝好的咖啡機,說明書不再叫你拆機找零件,而是帶你按面板上的設定鍵。
官方原文
**The app told Homebrew users to run a command that cannot work.** With no status file on disk, the popover footer said Run python3 main.py --setup and open Claude Code once — an instruction written for people who cloned the repo. Someone who installed the cask has no repo, so the natural next move is to look inside the bundle, and main.py really is in there: py2app copies it to Contents/Resources/. Running that copy with the system python3 dies on ImportError: cannot import name 'packaged_resource_path' from 'i18n', which points at the wrong thing entirely. The modules main.py imports are compiled into lib/python313.zip, and only the bundle's own interpreter has that on sys.path; with the real i18n.py unreachable, an unrelated PyPI package also named i18n in the user's site-packages answers the import instead. Both footer messages now name the "Set Up Status Line" button, which does the same job in one click and exists in every install regardless of how it was obtained. The bundled main.py additionally exits with an explanation when it is started without py2app's RESOURCEPATH, so the dead end says what it is instead of raising. (#92, reported by @kyang-06)