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

Aperta Adatta ai principianti
#5,338 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
github, python
Ambito
cli, testing

Direzione di ricerca

Leggi integrations/command_upgrade.py e test_command_upgrade.py, che l’issue indica come implementazione e test. Controlla il branch per un progetto senza integrazioni e conferma come viene verificato il suo codice di uscita. Il lavoro è completo quando il comportamento e il test concordano sul codice di uscita previsto per questo caso.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Python
Stelle
149k
Fork
13.4k
Merge medio
1g 5h
PR unite (30g)
223

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/spec-kit

Tutte le issue di github/spec-kit

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.