diff --git a/.bumpy/fix-includeif-case.md b/.bumpy/fix-includeif-case.md new file mode 100644 index 0000000..5912ba9 --- /dev/null +++ b/.bumpy/fix-includeif-case.md @@ -0,0 +1,5 @@ +--- +'@varlock/bumpy': patch +--- + +Fix git push auth failure caused by case-sensitive includeIf regex not matching lowercase keys from git config diff --git a/packages/bumpy/src/commands/ci.ts b/packages/bumpy/src/commands/ci.ts index 80339ba..b953ccd 100644 --- a/packages/bumpy/src/commands/ci.ts +++ b/packages/bumpy/src/commands/ci.ts @@ -251,7 +251,8 @@ function pushWithToken(rootDir: string, branch: string, config: BumpyConfig): vo const savedHeader = tryRunArgs(['git', 'config', '--local', extraHeaderKey], { cwd: rootDir }); // Collect includeIf entries that point to credential config files - const includeIfRaw = tryRunArgs(['git', 'config', '--local', '--get-regexp', '^includeIf\\.gitdir:'], { + // git config --get-regexp outputs keys in lowercase, so match accordingly + const includeIfRaw = tryRunArgs(['git', 'config', '--local', '--get-regexp', '^includeif\\.gitdir:'], { cwd: rootDir, }); const savedIncludeIfs: Array<{ key: string; value: string }> = [];