0
mirror of https://github.com/actions/checkout.git synced 2025-08-14 10:05:07 +00:00

Merge 110353ee6c3f4f041737e85298588eb167dae1ca into 08c6903cd8c0fde910a37f88322edcfb5dd907a8

This commit is contained in:
Nanashi. 2025-08-13 14:25:37 +10:00 committed by GitHub
commit 9d99182932
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -364,11 +364,13 @@ class GitAuthHelper {
}
}
const pattern = regexpHelper.escape(configKey)
await 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)
await 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
)
}
}
}