1
0
Fork 0
mirror of https://github.com/actions/checkout.git synced 2026-05-07 02:17:36 +02:00
This commit is contained in:
Keith Bauson 2026-05-05 08:41:55 +02:00 committed by GitHub
commit 1010c72ad7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 27 additions and 4 deletions

4
dist/index.js vendored
View file

@ -267,7 +267,7 @@ class GitAuthHelper {
// Configure both host and container paths to support Docker container actions.
for (const configPath of configPaths) {
// Submodule Git directory
let submoduleGitDir = path.dirname(configPath); // The config file is at .git/modules/submodule-name/config
let submoduleGitDir = yield fs.promises.realpath(path.dirname(configPath)); // The config file is at .git/modules/submodule-name/config
submoduleGitDir = submoduleGitDir.replace(/\\/g, '/'); // Use forward slashes, even on Windows
// Configure host includeIf
yield this.git.config(`includeIf.gitdir:${submoduleGitDir}.path`, credentialsConfigPath, false, // globalConfig?
@ -407,7 +407,7 @@ class GitAuthHelper {
}
else {
// Host git directory
let gitDir = path.join(this.git.getWorkingDirectory(), '.git');
let gitDir = yield fs.promises.realpath(path.join(this.git.getWorkingDirectory(), '.git'));
gitDir = gitDir.replace(/\\/g, '/'); // Use forward slashes, even on Windows
// Configure host includeIf
const hostIncludeKey = `includeIf.gitdir:${gitDir}.path`;