What Renovate type are you using?
Renovate CLI
Describe the bug
Renovate will fail when running on a repo without a commit history
Did you see anything helpful in debug logs?
ref refs/remotes/origin/HEAD is not a symbolic ref\n",
"stack": "Error: fatal: ref refs/remotes/origin/HEAD is not a symbolic ref\n\n at /Users/jackla/src/renovate/node_modules/simple-git/promise.js:21:26\n at Git.<anonymous> (/Users/jackla/src/renovate/node_modules/simple-git/src/git.js:645:18)\n at Function.Git.fail (/Users/jackla/src/renovate/node_modules/simple-git/src/git.js:1478:18)\n at fail (/Users/jackla/src/renovate/node_modules/simple-git/src/git.js:1436:20)\n at /Users/jackla/src/renovate/node_modules/simple-git/src/git.js:1445:16\n at <anonymous>\n at process._tickCallback (internal/process/next_tick.js:188:7)"
}
To Reproduce
Steps to reproduce the behavior:
ref refs/remotes/origin/HEAD is not a symbolic refExpected behavior
Screenshots
n/a
Additional context
We noticed this while developing BB Server support, but decided to raise it as a separate issue which can be addressed for all platforms at once.
note to self: this is easily fixed by throwing a specific error in initRepo in storage.js, and catching it in repository/error.js
I fixed this in GitLab by looking at its initRepo result. Similar solution was already in GitHub so it exits before any git. If for BB we can’t detect it early via API then we’ll need to catch it then throw an ‘empty’ error, which is handled gracefully.
Ie throw new Error(‘empty’)
le throw
—French developers
:tada: This issue has been resolved in version 14.42.3 :tada:
The release is available on:
Your semantic-release bot :package::rocket: