mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 23:16:26 +00:00
fix(gitfs): better git dir detection
This commit is contained in:
parent
01acb25361
commit
55ded1cae1
1 changed files with 2 additions and 1 deletions
|
@ -38,9 +38,10 @@ class Storage {
|
|||
config.platform,
|
||||
config.repository
|
||||
);
|
||||
const gitHead = path.join(repoDir, '.git/HEAD');
|
||||
let clone = true;
|
||||
// istanbul ignore if
|
||||
if (process.env.NODE_ENV !== 'test' && (await fs.exists(repoDir))) {
|
||||
if (process.env.NODE_ENV !== 'test' && (await fs.exists(gitHead))) {
|
||||
try {
|
||||
git = Git(repoDir).silent(true);
|
||||
await git.raw(['remote', 'set-url', 'origin', config.url]);
|
||||
|
|
Loading…
Reference in a new issue