fix(README): 安裝指令補上 git+ 前綴,否則 npm 會把它當壓縮檔

npm 只有看到 git/git+ssh/git+http/git+https/git+file 才會當成 git repo。
寫成 https://….git 會被歸類成遠端 tarball,下載回來解壓失敗,錯誤是
TAR_BAD_ARCHIVE: Unrecognized archive format——看起來完全不像「網址寫法錯了」,
使用者只會以為套件壞了。

先前那條「README 指令逐字執行得動」的測試沒抓到,因為它只跑 tea-sdlc 開頭的
行,npm 那行從來沒被執行過。補一條規則把 .git 網址必須帶 git+ 前綴釘住:
真的去跑一次 npm 全域安裝要開網路、要三秒,不適合放進這套向來密封的測試裡,
但「前綴在不在」這條規則本身就足以擋掉這個錯。

議題 #25

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-17 15:30:27 +08:00
co-authored by Claude Opus 5
parent 9644b6a638
commit 67528dde5f
2 changed files with 16 additions and 4 deletions
+5 -2
View File
@@ -67,11 +67,14 @@ tea-sdlc/
一行裝好,終端機就多出一個 `tea-sdlc` 指令:
```bash
npm i -g https://gitea.jsc.idv.tw/plugins/tea-sdlc.git
npm i -g git+https://gitea.jsc.idv.tw/plugins/tea-sdlc.git
```
要裝特定版本就在網址後面接上 tag:`...tea-sdlc.git#v0.1.0`。不必設定任何 registry 或憑證。
> `git+` 前綴不能省。npm 只有看到 `git+https://` 才會當成 git repo;寫成 `https://….git`
> 會被當成遠端壓縮檔下載,然後以 `TAR_BAD_ARCHIVE: Unrecognized archive format` 失敗。
接著把六個流程指令佈署到你裝了的每個 agent 平台:
```bash
@@ -114,7 +117,7 @@ tea-sdlc install --dry-run
| 想做的事 | 指令 |
| --- | --- |
| 更新到最新版 | `npm i -g https://gitea.jsc.idv.tw/plugins/tea-sdlc.git` |
| 更新到最新版 | `npm i -g git+https://gitea.jsc.idv.tw/plugins/tea-sdlc.git` |
| 指令數量變了之後重新佈署 | `tea-sdlc install` |
| 查目前版本、正本位置與環境 | `tea-sdlc status` |
| 只移除轉接檔(正本不動) | `tea-sdlc uninstall` |