Closed jldec closed 4 months ago
@janfjohannes - I validated that this issue is resolved in https://github.com/opral/monorepo/pull/2575
$ pnpm inlang validate --project ./project3-dir/project.inlang
ℹ 🔎 Validating the inlang project... 1:07:46 PM
using experimental git features for this repo. [ 'lazyClone', 'lixCommit' ]
Using existing cloned repo
shallow clone detected, not generating first commit hash.
✔ The project is valid! 1:07:47 PM
0
Confirmed resolved - test passes in project3 without project id.
Context
Discovered while debugging faling test in https://github.com/opral/monorepo/pull/2549
The github/actions/checkout performs a shallow clone.
The failing test runs the inlang CLI, which loads a project that needs a new project id.
This results in a call to
getFirstCommitHash()
on the (shallow) checked out monorepo.causing the cli to 💥 and the test to fail.
To reproduce locally:
(it probably doesn't matter which ref is fetched - this one happens to include the debug console.logs from the PR)
Result of running ☝️
inlang validate
terminates with exit code 0.Proposal
The call should either throw an error or return undefined if it cannot find the first commit.