Add --mutex option to yarn commands (#9919)
Attempt to improve reliability of running yarn commands. Our project structure might cause yarn to be launched multiple times. According to yarn docs, this option should avoid conflicts between multiple instances of yarn https://yarnpkg.com/en/docs/cli/#toc-concurrency-and-mutex
This commit is contained in:
parent
20d0497163
commit
8863ebfda1
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
<Target Name="Restore">
|
||||
<Message Importance="High" Text="Running yarn install on $(MSBuildProjectFullPath)" />
|
||||
<Yarn Command="install $(InstallArgs)" StandardOutputImportance="High" StandardErrorImportance="High" />
|
||||
<Yarn Command="install --mutex network $(InstallArgs)" StandardOutputImportance="High" StandardErrorImportance="High" />
|
||||
</Target>
|
||||
|
||||
<Target Name="PrepareForBuild">
|
||||
|
|
|
|||
|
|
@ -12,10 +12,5 @@
|
|||
<IsTestProject>false</IsTestProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="InstallPuppeteer" BeforeTargets="Restore">
|
||||
<!-- Explicitly install puppeteer. This will install the bundled Chromium as part of restore instead of as part of execution -->
|
||||
<Yarn Command="add puppeteer" />
|
||||
</Target>
|
||||
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
<Target Name="YarnInstall">
|
||||
<Message Text="Running yarn install on $(MSBuildProjectFile)" Importance="High" />
|
||||
<Yarn Command="install" />
|
||||
<Yarn Command="install --mutex network" />
|
||||
</Target>
|
||||
|
||||
<Target Name="_IsCustomRestoreTargetSupported" Returns="@(CustomRestoreTargets)" Condition="'$(BuildNodeJs)' == 'true'">
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
<Target Name="YarnInstall">
|
||||
<Message Text="Running yarn install on $(MSBuildProjectFile)" Importance="High" />
|
||||
<Yarn Command="install" />
|
||||
<Yarn Command="install --mutex network" />
|
||||
</Target>
|
||||
|
||||
<Target Name="_IsCustomRestoreTargetSupported" Returns="@(CustomRestoreTargets)" Condition="'$(BuildNodeJs)' == 'true'">
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
Importance="High"
|
||||
Text="Prerequisites were not enforced at build time. Running Yarn or the E2E tests might fail as a result. Check /src/Shared/E2ETesting/Readme.md for instructions." />
|
||||
|
||||
<Yarn Command="install" />
|
||||
<Yarn Command="install --mutex network" />
|
||||
</Target>
|
||||
|
||||
<Target Name="_IsCustomRestoreTargetSupported" Returns="@(CustomRestoreTargets)" Condition="'$(BuildNodeJs)' == 'true'">
|
||||
|
|
|
|||
Loading…
Reference in New Issue