Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

tooling: mise run install fails when core.hooksPath is set outside the repo (prek hook install is fatal)

Đang mở Phù hợp với người mới
#968 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ệ
git, python, typescript
Lĩnh vực
tooling

Hướng nghiên cứu

Đọc các định nghĩa tác vụ mise ở thư mục gốc cho install và hooks:install, sau đó tái hiện với core.hooksPath được thiết lập toàn cục và chạy mise run install. Xác nhận việc cài đặt các dependency hoàn tất và tác vụ kết thúc thành công khi không thể cài đặt hook; hooks:install vẫn nên được cung cấp như một cách dành cho người đóng góp.

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

Mô tả

Component: CDK / infrastructure (repo tooling: mise run install)

Describe the bug

The root install task ends with prek install --prepare-hooks. On machines where core.hooksPath is set at global or system scope (common on managed corporate machines that ship their own git hooks), prek refuses:

error: Refusing to install hooks because `core.hooksPath` is configured outside this repository.
[//:install] ERROR task failed

Because it is the last command of install, the whole task fails even though the Yarn workspaces and the agent's Python environment were installed successfully. Anyone who only wants to deploy (not contribute) is blocked by a contributor-only step, and the documented remedy in CONTRIBUTING.md (git config --unset-all core.hooksPath) is often not something they are allowed to do on a managed machine.

Expected behavior

mise run install succeeds and installs dependencies. Hook installation is either skipped with a clear warning when core.hooksPath is owned elsewhere, or split into its own task (hooks:install already exists).

Current behavior

mise run install exits non-zero after installing all dependencies, so scripts and guides that run it treat installation as failed.

Reproduction steps

  1. git config --global core.hooksPath /some/other/dir (or a system-level equivalent).
  2. Fresh clone, mise run install.
  3. Observe the failure from prek install --prepare-hooks.

Possible solution

Make the hook step non-fatal in install, e.g. prek install --prepare-hooks || echo "warning: git hooks not installed (core.hooksPath is set elsewhere); see CONTRIBUTING.md", and keep hooks:install as the strict path for contributors. Never change the user's global/system git config automatically.

Environment

  • macOS arm64 · mise 2026.10.18 · Commit 6dad935f (main)
Ngôn ngữ chính
TypeScript
Star
165
Fork
50
Merge trung bình
7 giờ 32 phút
Pull request đã merge (30 ngày)
6

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

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 aws-samples/sample-autonomous-cloud-coding-agents

Tất cả issue của aws-samples/sample-autonomous-cloud-coding-agents

Issue tương tự

Thêm issue về TypeScript

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.