frontsideair / frontsideair/yarnhook

git error when running yarnhook

Open
#39 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
219
Forks
16
PR merge metrics
No merged PRs in 30d

Description

I cloned a project that uses yarnhook, changed a file, and then ran `git checkout` on that file. `yarnhook` got triggered, but it failed with this output:

```
/node_modules/.bin/yarnhook
/node_modules/yarnhook/node_modules/execa/index.js:303

throw (result.error || new Error(result.stderr === '' ? result.stdout : result.stderr));
^
Error: fatal: Log for 'HEAD' only has 1 entries.
at Function.module.exports.sync (/node_modules/yarnhook/node_modules/execa/index.js:303:26)
at Object. (/node_modules/yarnhook/index.js:58:38)
at Module._compile (internal/modules/cjs/loader.js:1147:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
at Module.load (internal/modules/cjs/loader.js:996:32)
at Function.Module._load (internal/modules/cjs/loader.js:896:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47
error Command failed with exit code 1.
```

Tried googling but found nothing. Any advice?

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the failure by editing a file and running git checkout in a project using yarnhook. Start at node_modules/yarnhook/index.js:58 and the reported execa error at index.js:303; determine why this Git operation produces the error and verify that the hook completes successfully afterward.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, javascript, nodejs
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.