File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -145,19 +145,17 @@ if (-not $KeepEnv)
145145 }
146146
147147 # Add git identity to environment
148- $env: GIT_USER_EMAIL = git config -- global user.email
149- $env: GIT_USER_NAME = git config -- global user.name
150-
151148 if ($env: IS_TEAMCITY_AGENT )
152149 {
153- if (-not $env: GIT_USER_EMAIL )
154- {
155- $env: GIT_USER_EMAIL = ' teamcity@postsharp.net'
156- }
157- if (-not $env: GIT_USER_NAME )
158- {
159- $env: GIT_USER_NAME = ' teamcity'
160- }
150+ # On TeamCity agents, use a fixed git user.
151+ $env: GIT_USER_EMAIL = ' teamcity@postsharp.net'
152+ $env: GIT_USER_NAME = ' teamcity'
153+ }
154+ else
155+ {
156+ # On developer machines, use the current git user.
157+ $env: GIT_USER_EMAIL = git config -- global user.email
158+ $env: GIT_USER_NAME = git config -- global user.name
161159 }
162160
163161 New-EnvJson - EnvironmentVariableList $EnvironmentVariables
You can’t perform that action at this time.
0 commit comments