core.startGroup('Persisting credentials for submodules');
yieldauthHelper.configureSubmoduleAuth();
core.endGroup();
}
}
finally{
@ -5901,7 +5915,9 @@ function getSource(settings) {
finally{
// Remove auth
if(!settings.persistCredentials){
core.startGroup('Removing auth');
yieldauthHelper.removeAuth();
core.endGroup();
}
}
});
@ -7241,6 +7257,7 @@ function prepareExistingDirectory(git, repositoryPath, preferredRemoteUrl, allow
}
}
try{
core.startGroup('Removing previously created refs, to avoid conflicts');
// Checkout detached HEAD
if(!(yieldgit.isDetached())){
yieldgit.checkoutDetach();
@ -7255,8 +7272,10 @@ function prepareExistingDirectory(git, repositoryPath, preferredRemoteUrl, allow
for(constbranchofbranches){
yieldgit.branchDelete(true,branch);
}
core.endGroup();
// Clean
if(clean){
core.startGroup('Cleaning the repository');
if(!(yieldgit.tryClean())){
core.debug(`The clean command failed. This might be caused by: 1) path too long, 2) permission issue, or 3) file in use. For futher investigation, manually run 'git clean -ffdx' on the directory '${repositoryPath}'.`);
remove=true;
@ -7264,6 +7283,7 @@ function prepareExistingDirectory(git, repositoryPath, preferredRemoteUrl, allow
elseif(!(yieldgit.tryReset())){
remove=true;
}
core.endGroup();
if(remove){
core.warning(`Unable to clean or reset the repository. The repository will be recreated instead.`);
@ -53,6 +53,7 @@ export async function prepareExistingDirectory(
}
try{
core.startGroup('Removing previously created refs, to avoid conflicts')
// Checkout detached HEAD
if(!(awaitgit.isDetached())){
awaitgit.checkoutDetach()
@ -69,9 +70,11 @@ export async function prepareExistingDirectory(
for(constbranchofbranches){
awaitgit.branchDelete(true,branch)
}
core.endGroup()
// Clean
if(clean){
core.startGroup('Cleaning the repository')
if(!(awaitgit.tryClean())){
core.debug(
`The clean command failed. This might be caused by: 1) path too long, 2) permission issue, or 3) file in use. For futher investigation, manually run 'git clean -ffdx' on the directory '${repositoryPath}'.`
@ -80,6 +83,7 @@ export async function prepareExistingDirectory(