Commit 2d76d21
committed
Pin GIT_CONFIG_GLOBAL to the temp config during global auth setup
configureTempGlobalConfig isolates global git config by overriding HOME to
a temporary directory. But GIT_CONFIG_GLOBAL takes precedence over HOME when
git locates the global config file, so when a workflow already has
GIT_CONFIG_GLOBAL set in the environment, 'git config --global' writes land
in that file instead of the temporary config. replaceTokenPlaceholder then
reads the temporary config, cannot find the placeholder, and fails with
'Unable to replace auth placeholder'.
Set GIT_CONFIG_GLOBAL to the temporary config alongside the HOME override so
global config operations always target the temp file regardless of any
inherited value, and unset it again in removeGlobalConfig.
Assisted-By: Claude Opus 4.81 parent b9e0990 commit 2d76d21
3 files changed
Lines changed: 34 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
923 | 923 | | |
924 | 924 | | |
925 | 925 | | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
926 | 945 | | |
927 | 946 | | |
928 | 947 | | |
| |||
933 | 952 | | |
934 | 953 | | |
935 | 954 | | |
| 955 | + | |
936 | 956 | | |
937 | 957 | | |
938 | 958 | | |
939 | 959 | | |
940 | 960 | | |
941 | 961 | | |
942 | 962 | | |
| 963 | + | |
943 | 964 | | |
944 | 965 | | |
945 | 966 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35109 | 35109 | | |
35110 | 35110 | | |
35111 | 35111 | | |
| 35112 | + | |
| 35113 | + | |
| 35114 | + | |
| 35115 | + | |
35112 | 35116 | | |
35113 | 35117 | | |
35114 | 35118 | | |
| |||
35183 | 35187 | | |
35184 | 35188 | | |
35185 | 35189 | | |
35186 | | - | |
| 35190 | + | |
35187 | 35191 | | |
| 35192 | + | |
35188 | 35193 | | |
35189 | 35194 | | |
35190 | 35195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
125 | 130 | | |
126 | 131 | | |
127 | 132 | | |
| |||
237 | 242 | | |
238 | 243 | | |
239 | 244 | | |
240 | | - | |
| 245 | + | |
241 | 246 | | |
| 247 | + | |
242 | 248 | | |
243 | 249 | | |
244 | 250 | | |
| |||
0 commit comments