Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .vsts-ci/linux-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,19 @@ stages:
condition: succeededOrFailed()

- pwsh: |
Import-Module .\build.psm1
Set-CorrectLocale

Import-Module .\tools\ci.psm1
Restore-PSOptions -PSOptionsPath '$(System.ArtifactsDirectory)\build\psoptions.json'
Invoke-CITest -Purpose UnelevatedPesterTests -TagSet Others
displayName: Test - UnelevatedPesterTests - Others
condition: succeededOrFailed()

- pwsh: |
Import-Module .\build.psm1
Set-CorrectLocale

Import-Module .\tools\ci.psm1
Restore-PSOptions -PSOptionsPath '$(System.ArtifactsDirectory)\build\psoptions.json'
Invoke-CITest -Purpose ElevatedPesterTests -TagSet Others
Expand Down
11 changes: 1 addition & 10 deletions .vsts-ci/templates/nix-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,7 @@ jobs:

- pwsh: |
Import-Module .\build.psm1 -Force
$environment = Get-EnvironmentInformation
$isUbuntu20 = $environment.IsUbuntu -and $environment.IsUbuntu20
if ($isUbuntu20) {
$env:LC_ALL='en_US.UTF-8'
$env:LANG='en_US.UTF-8'
sudo locale-gen $LANG
sudo update-locale
}

locale
Set-CorrectLocale

Import-Module .\tools\ci.psm1
Restore-PSOptions -PSOptionsPath '$(System.ArtifactsDirectory)\build\psoptions.json'
Expand Down
20 changes: 20 additions & 0 deletions build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -3386,3 +3386,23 @@ function New-NugetConfigFile

Set-Content -Path (Join-Path $Destination 'nuget.config') -Value $content -Force
}

function Set-CorrectLocale
{
if (-not $IsLinux)
{
return
}

$environment = Get-EnvironmentInformation
if ($environment.IsUbuntu -and $environment.IsUbuntu20)
{
$env:LC_ALL = 'en_US.UTF-8'
$env:LANG = 'en_US.UTF-8'
sudo locale-gen $env:LANG
sudo update-locale
}

# Output the locale to log it
locale
}