[submodules_fix] Pull/removes submodules only if submodules is specified.

This commit is contained in:
Giridharan Manivannan 2021-03-31 21:42:06 +05:30
parent 61b9e3751b
commit 156929d41d
2 changed files with 12 additions and 8 deletions

View file

@ -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
)
}
}
}