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

Crashes if `metamask-module-template` already exists in temp directory but is not a Git repo

Đang mở
#19 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
55/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
git, typescript
Lĩnh vực
cli, tooling

Hướng nghiên cứu

Bắt đầu trong src/cli.ts, tại logic tìm nạp template xung quanh lệnh gọi git pull đang bị lỗi. Tái hiện trường hợp với một thư mục metamask-module-template hiện có nhưng thiếu .git, sau đó xác minh rằng công cụ xử lý thư mục đó phù hợp và không còn bị kẹt ở spinner tìm nạp.

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

Mô tả

bug team-wallet-framework wf-bugs

I've tried using both npx @metamask/template-sync and yarn dlx @metamask/template-sync on a project and get the same error:

⠋ Fetching module template.Error: Command failed with exit code 128: git pull
fatal: not a git repository (or any of the parent directories): .git
    at makeError (/private/var/folders/gz/d8jvtc0n0rncp1xz80k0x62m0000gn/T/xfs-cd883ffe/dlx-65796/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/private/var/folders/gz/d8jvtc0n0rncp1xz80k0x62m0000gn/T/xfs-cd883ffe/dlx-65796/node_modules/execa/index.js:118:26)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async task (/private/var/folders/gz/d8jvtc0n0rncp1xz80k0x62m0000gn/T/xfs-cd883ffe/dlx-65796/node_modules/@metamask/template-sync/dist/cli.js:36:21)
    at async main (/private/var/folders/gz/d8jvtc0n0rncp1xz80k0x62m0000gn/T/xfs-cd883ffe/dlx-65796/node_modules/@metamask/template-sync/dist/cli.js:114:9) {
  shortMessage: 'Command failed with exit code 128: git pull',
  command: 'git pull',
  escapedCommand: 'git pull',
  exitCode: 128,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: 'fatal: not a git repository (or any of the parent directories): .git',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}
⠼ Fetching module template.

It looks like this line is failing. This happens if a metamask-module-template directory already exists in the temporary directory root but is not a Git repository for some reason.

(Also, for some reason, the tool doesn't exit, but the spinner next to "Fetching module template" keeps spinning, but that seems like a separate issue.)

It seems like we ought to check that a .git directory exists in the metamask-module-template directory instead.

Ngôn ngữ chính
TypeScript
Star
7
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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 MetaMask/template-sync

Tất cả issue của MetaMask/template-sync

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.