From b9935aab1f1f1374eb0a1281a4654c8fc4d669c0 Mon Sep 17 00:00:00 2001 From: Cosimo Streppone Date: Wed, 13 Jan 2021 09:58:23 +0100 Subject: [PATCH] Tried to fix the "unstaged changes" test failure Error: Unstaged changes detected. Locally try running: git clean -ffdx && npm ci && npm run format && npm run build Error: Process completed with exit code 1. Rebased PR from #424 --- dist/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 605cb7b..f5bdb0d 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7589,8 +7589,10 @@ class GitAuthHelper { core.warning(`Failed to remove '${configKey}' from the git config`); } } - const pattern = regexpHelper.escape(configKey); - yield 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); + yield this.git.submoduleForeach(`git config --local --name-only --get-regexp '${pattern}' && git config --local --unset-all '${configKey}' || :`, true); + } }); } }