diff --git a/src/git-auth-helper.ts b/src/git-auth-helper.ts index 291d83b..7d620fc 100644 --- a/src/git-auth-helper.ts +++ b/src/git-auth-helper.ts @@ -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 + ) + } } }