mirror of
https://github.com/actions/checkout.git
synced 2025-03-14 04:14:10 +00:00
Merge 44b7815b62b9d1800c8a24887ff1c2eae2aa2ad8 into ac593985615ec2ede58e132d2e21d2b1cbd6127c
This commit is contained in:
commit
e1b045a734
6
dist/index.js
vendored
6
dist/index.js
vendored
@ -9387,8 +9387,10 @@ function prepareExistingDirectory(git, repositoryPath, repositoryUrl, clean, ref
|
||||
remove = true;
|
||||
}
|
||||
// Fetch URL does not match
|
||||
else if (!fsHelper.directoryExistsSync(path.join(repositoryPath, '.git')) ||
|
||||
repositoryUrl !== (yield git.tryGetFetchUrl())) {
|
||||
else if (!fsHelper.directoryExistsSync(path.join(repositoryPath, '.git'))) {
|
||||
remove = clean;
|
||||
}
|
||||
else if (repositoryUrl !== (yield git.tryGetFetchUrl())) {
|
||||
remove = true;
|
||||
}
|
||||
else {
|
||||
|
@ -24,10 +24,10 @@ export async function prepareExistingDirectory(
|
||||
remove = true
|
||||
}
|
||||
// Fetch URL does not match
|
||||
else if (
|
||||
!fsHelper.directoryExistsSync(path.join(repositoryPath, '.git')) ||
|
||||
repositoryUrl !== (await git.tryGetFetchUrl())
|
||||
) {
|
||||
else if (!fsHelper.directoryExistsSync(path.join(repositoryPath, '.git'))) {
|
||||
remove = clean
|
||||
}
|
||||
else if (repositoryUrl !== (await git.tryGetFetchUrl())) {
|
||||
remove = true
|
||||
} else {
|
||||
// Delete any index.lock and shallow.lock left by a previously canceled run or crashed git process
|
||||
|
Loading…
x
Reference in New Issue
Block a user