Browse Source

[Infrastructure] Avoid downloading browsers during source build (#54036)

* Set PUPPETEER_SKIP_DOWNLOAD=1 to avoid downloading the browsers during source build
Javier Calvarro Nelson 2 years ago
parent
commit
9db62024cb
1 changed files with 7 additions and 1 deletions
  1. 7 1
      eng/SourceBuild.props

+ 7 - 1
eng/SourceBuild.props

@@ -107,9 +107,15 @@
       Command="npm --version"
       WorkingDirectory="$(InnerSourceBuildRepoRoot)" />
 
+    <PropertyGroup>
+      <!-- Disable installing puppeteer browsers when running in source build -->
+      <_AdditionalEnvironmentVariable Condition="$(ArcadeBuildFromSource) == 'true'">PUPPETEER_SKIP_DOWNLOAD=1</_AdditionalEnvironmentVariable>
+    </PropertyGroup>
+
     <Exec
       Command="npm ci --offline"
-      WorkingDirectory="$(InnerSourceBuildRepoRoot)" />
+      WorkingDirectory="$(InnerSourceBuildRepoRoot)"
+      EnvironmentVariables="$(_AdditionalEnvironmentVariable)" />
 
   </Target>