Fix: Don't remove auth if submodules are off

This commit is contained in:
Nanashi 2022-06-20 17:08:30 +09:00 committed by GitHub
parent 2541b1294d
commit f2738ccb35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -363,10 +363,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
)
)
}
}