Skip to content

Commit

Permalink
Remove invalid characters in basename sourced from username (Azure#17489
Browse files Browse the repository at this point in the history
)

Co-authored-by: Ben Broderick Phillips <bebroder@microsoft.com>
  • Loading branch information
azure-sdk and benbp authored Nov 11, 2020
1 parent 530ddf1 commit 9d29bbb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eng/common/TestResources/New-TestResources.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ if (!$templateFiles) {
}

$UserName = if ($env:USER) { $env:USER } else { "${env:USERNAME}" }
# Remove spaces, etc. that may be in $UserName
$UserName = $UserName -replace '\W'

# If no base name is specified use current user name
if (!$BaseName) {
Expand Down

0 comments on commit 9d29bbb

Please sign in to comment.