Skip to content

Commit

Permalink
shorten Windows CI username (#6190)
Browse files Browse the repository at this point in the history
Keeping CI working on Windows involves a constant fight against
MAX_PATH, which is a very short 260 characters. As the username appears
in some paths, sometimes multiple times, we can save a few precious
characters by having it shorter.

CHANGELOG_BEGIN
CHANGELOG_END
  • Loading branch information
garyverhaegen-da authored Jun 6, 2020
1 parent 0625e68 commit b9fbba7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $ARTIFACT_DIRS = if ("$env:BUILD_ARTIFACTSTAGINGDIRECTORY") { $env:BUILD_ARTIFAC
# If a previous build was forcefully terminated, then stack's lock file might
# not have been cleaned up properly leading to errors of the form
#
# user error (hTryLock: lock already exists: C:\Users\VssAdministrator\AppData\Roaming\stack\pantry\hackage\hackage-security-lock)
# user error (hTryLock: lock already exists: C:\Users\u\AppData\Roaming\stack\pantry\hackage\hackage-security-lock)
#
# The package cache might be corrupted and just removing the lock might lead to
# errors as below, so we just nuke the entire stack cache.
Expand Down
2 changes: 1 addition & 1 deletion infra/vsts_agent_windows.tf
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ $partition | Set-Content C:\diskpart.txt
& diskpart /s C:\diskpart.txt 2>&1 | %{ "$_" }
# Create a temporary and random password for the VSTS user, forget about it once this script has finished running
$Username = "VssAdministrator"
$Username = "u"
$Account = "$env:COMPUTERNAME\$Username"
Add-Type -AssemblyName System.Web
$Password = [System.Web.Security.Membership]::GeneratePassword(24, 0)
Expand Down

0 comments on commit b9fbba7

Please sign in to comment.