Crashes if `metamask-module-template` already exists in temp directory but is not a Git repo
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- git, typescript
Research direction
Start in src/cli.ts at the template-fetching logic around the failing git pull call. Reproduce the case with an existing metamask-module-template directory that lacks .git, then verify that the tool handles that directory appropriately and no longer remains stuck with the fetching spinner.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MetaMask/template-sync
-
bug team-wallet-framework wf-bugs
Difficulty 3/5 1-2 days Newbie friendliness 45/100
MetaMask/template-sync#30 ·
-
`package.json` synchronizer assumes that all dependency version strings use a leading character Openbug team-wallet-framework wf-bugs
Difficulty 2/5 1-3 hours Newbie friendliness 58/100
MetaMask/template-sync#24 ·
-
bug team-wallet-framework wf-bugs
Difficulty 3/5 1-2 days Newbie friendliness 45/100
MetaMask/template-sync#21 ·
-
bug team-wallet-framework wf-bugs
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
MetaMask/template-sync#20 ·
All issues in MetaMask/template-sync
Similar issues
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Mend: dependency security vulnerability untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 70/100