Skip to content

Commit 81e637e

Browse files
committed
Change to checking that identities are set.
1 parent 528ce32 commit 81e637e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

DockerBuild.ps1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,12 @@ if (-not $KeepEnv)
147147
# Add git identity to environment
148148
if ($env:IS_TEAMCITY_AGENT)
149149
{
150-
# On TeamCity agents, use a fixed git user.
151-
$env:GIT_USER_EMAIL = '[email protected]'
152-
$env:GIT_USER_NAME = 'teamcity'
150+
# On TeamCity agents, check if the environment variables are set.
151+
if (-not $env:GIT_USER_EMAIL -or -not $env:GIT_USER_NAME)
152+
{
153+
Write-Error "On TeamCity agents, the GIT_USER_EMAIL and GIT_USER_NAME environment variables must be set."
154+
exit 1
155+
}
153156
}
154157
else
155158
{

0 commit comments

Comments
 (0)