mirror of
https://github.com/actions/checkout.git
synced 2026-01-20 23:58:56 +08:00
[submodules_fix] Pull/removes submodules only if submodules is specified.
This commit is contained in:
parent
61b9e3751b
commit
156929d41d
2 changed files with 12 additions and 8 deletions
|
|
@ -341,10 +341,12 @@ class GitAuthHelper {
|
|||
}
|
||||
}
|
||||
|
||||
const pattern = regexpHelper.escape(configKey)
|
||||
await this.git.submoduleForeach(
|
||||
`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(
|
||||
`git config --local --name-only --get-regexp '${pattern}' && git config --local --unset-all '${configKey}' || :`,
|
||||
true
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue