Another attempt to work around Linux locale issue

This commit is contained in:
Ryan Nowak 2018-12-01 18:21:04 -08:00
Родитель 694924c83a
Коммит 68fd301806
2 изменённых файлов: 15 добавлений и 3 удалений

Просмотреть файл

@ -139,7 +139,6 @@ phases:
- script: eng/common/cibuild.sh
--configuration $(_BuildConfig)
--prepareMachine
env: { LC_ALL: en_US.UTF-8 } # workaround an issue with bash + MSBuild
name: Build
displayName: Build
condition: succeeded()

Просмотреть файл

@ -15,8 +15,21 @@
<Error Condition="!Exists('$(DotNetInstallScript)')" Text="Could not find dotnet-install at $(DotNetInstallScript)" />
<Exec Command="powershell -ExecutionPolicy ByPass -NoProfile -File &quot;$(DotNetInstallScript)&quot; $(DotNetInstallArgs) -Version %(DotNetRuntime.Identity)" ConsoleToMsBuild="true" Condition="'$(OS)' == 'Windows_NT'" />
<Exec Command="&quot;$(DotNetInstallScript)&quot; $(DotNetInstallArgs) --version %(DotNetRuntime.Identity)" ConsoleToMsBuild="true" Condition="'$(OS)' != 'Windows_NT'" />
<!--
We're seeing issues on Linux in Azure Pipelines where MSBuild tries to set LC_ALL to utf8 when running a shell script.
We don't really care about this error and it's non-blocking, but MSBuild's default parsing still flags it as an error.
Setting IgnoreStandardErrorWarningFormat=true will work around that problem.
-->
<Exec
Condition="'$(OS)' == 'Windows_NT'"
Command="powershell -ExecutionPolicy ByPass -NoProfile -File &quot;$(DotNetInstallScript)&quot; $(DotNetInstallArgs) -Version %(DotNetRuntime.Identity)"
ConsoleToMsBuild="true"
IgnoreStandardErrorWarningFormat="true" />
<Exec
Condition="'$(OS)' != 'Windows_NT'"
Command="&quot;$(DotNetInstallScript)&quot; $(DotNetInstallArgs) --version %(DotNetRuntime.Identity)"
ConsoleToMsBuild="true"
IgnoreStandardErrorWarningFormat="true" />
</Target>
</Project>