`specify integration upgrade` exits 0 when nothing is installed: intended?

オープン 初心者向け
#5,338 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
82/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
github, python
領域
cli, testing

調査の方向性

issueで実装とテストとして示されている integrations/command_upgrade.py と test_command_upgrade.py を読みます。integrationがないプロジェクトについてbranchを確認し、その終了コードがどのようにアサートされているかを確認します。このケースで意図された終了ステータスについて、動作とテストが一致すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

triage-must-have

What happens (v1.2.6 and main)
In a project with no integration recorded, specify integration upgrade prints No integration is currently installed. and exits 0. test_command_upgrade.py asserts that exit code, so it looks deliberate, which is why I'm asking rather than calling it a bug.

Why it matters
Tools and scripts chain upgrades, for example specify self upgrade && specify integration upgrade && .... Exit 0 reads as "upgraded", so the chain carries on and reports success when nothing changed. Our editor extension's Upgrade button hit exactly this.

Reproduction

cd "$(mktemp -d)" && git init -q && mkdir .specify
uvx -q --from git+https://github.com/github/[email protected] specify integration upgrade; echo "exit=$?"
# No integration is currently installed.
# exit=0

Proposed fix
In integrations/command_upgrade.py, raise typer.Exit(1) instead of typer.Exit(0) on that branch, and update the one test to expect 1. If you'd rather keep 0 for interactive use, a --strict flag that exits 1 would also work for scripts. I can open the PR either way.

AI disclosure: found and reproduced with Claude Code (Claude Opus 5.5, default settings) in a throwaway sandbox; I checked the code and the test before filing.

主要言語
Python
スター
149k
フォーク
13.4k
平均マージ
1日 5時間
マージ済み PR(30日)
223

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/spec-kit のほかの issue

github/spec-kit の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。