Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
path: root/src/git-auth-helper.ts
diff options
context:
space:
mode:
authorCory Miller <13227161+cory-miller@users.noreply.github.com>2022-12-13 10:14:06 -0500
committerGitHub <noreply@github.com>2022-12-13 10:14:06 -0500
commit65a6e4ea0b386358ec7c217f4d31ad5590802f50 (patch)
treec5e92e481a1210e35802359063da9e9ab7443f0c /src/git-auth-helper.ts
parent363a2be3537234dda8c07b08651b4a8ff1615f8b (diff)
Add backports to v2 branch (#1040)v2.6.0
* Update licensed version * Backport for submodule command wrapping * Update NPM packages * Update dist/index.js * Rebuild using Node 12 * Rebuild after a more aggressive cleanup of local files * Backport change to replace datadog/squid with ubuntu/squid
Diffstat (limited to 'src/git-auth-helper.ts')
-rw-r--r--src/git-auth-helper.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/git-auth-helper.ts b/src/git-auth-helper.ts
index 8a1c7c3..400b1ac 100644
--- a/src/git-auth-helper.ts
+++ b/src/git-auth-helper.ts
@@ -157,7 +157,8 @@ class GitAuthHelper {
// by process creation audit events, which are commonly logged. For more information,
// refer to https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/manage/component-updates/command-line-process-auditing
const output = await this.git.submoduleForeach(
- `git config --local '${this.tokenConfigKey}' '${this.tokenPlaceholderConfigValue}' && git config --local --show-origin --name-only --get-regexp remote.origin.url`,
+ // wrap the pipeline in quotes to make sure it's handled properly by submoduleForeach, rather than just the first part of the pipeline
+ `sh -c "git config --local '${this.tokenConfigKey}' '${this.tokenPlaceholderConfigValue}' && git config --local --show-origin --name-only --get-regexp remote.origin.url"`,
this.settings.nestedSubmodules
)
@@ -365,7 +366,8 @@ 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}' || :`,
+ // wrap the pipeline in quotes to make sure it's handled properly by submoduleForeach, rather than just the first part of the pipeline
+ `sh -c "git config --local --name-only --get-regexp '${pattern}' && git config --local --unset-all '${configKey}' || :"`,
true
)
}