3
0
Fork 0
mirror of https://code.forgejo.org/actions/checkout.git synced 2025-04-24 12:25:34 +00:00
This commit is contained in:
Kaido Kert 2025-01-17 15:34:49 -05:00 committed by GitHub
commit 435bc38426
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 10 deletions

10
dist/index.js vendored
View file

@ -424,10 +424,12 @@ class GitAuthHelper {
core.warning(`Failed to remove '${configKey}' from the git config`);
}
}
const pattern = regexpHelper.escape(configKey);
yield this.git.submoduleForeach(
// wrap the pipeline in quotes to make sure it's handled properly by submoduleForeach, rather than just the first part of the pipeline
`sh -c "git config --local --name-only --get-regexp '${pattern}' && git config --local --unset-all '${configKey}' || :"`, true);
if (this.settings.submodules) {
const pattern = regexpHelper.escape(configKey);
yield this.git.submoduleForeach(
// wrap the pipeline in quotes to make sure it's handled properly by submoduleForeach, rather than just the first part of the pipeline
`sh -c "git config --local --name-only --get-regexp '${pattern}' && git config --local --unset-all '${configKey}' || :"`, true);
}
});
}
}