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

Đang mở Phù hợp với người mới
#5,338 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
github, python
Lĩnh vực
cli, testing

Hướng nghiên cứu

Đọc integrations/command_upgrade.py và test_command_upgrade.py, được issue xác định là phần triển khai và bài kiểm thử. Kiểm tra branch cho một dự án không có integration và xác nhận mã thoát của dự án được khẳng định như thế nào. Hoàn tất khi hành vi và bài kiểm thử thống nhất về trạng thái thoát dự kiến cho trường hợp này.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
149k
Fork
13.4k
Merge trung bình
1 ngày 5 giờ
Pull request đã merge (30 ngày)
223

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/spec-kit

Tất cả issue của github/spec-kit

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.