Skip to content

Commit

Permalink
Merge pull request #9 from rickbutterfield/feature/iis-fix
Browse files Browse the repository at this point in the history
Running the package on IIS
  • Loading branch information
rickbutterfield authored May 1, 2024
2 parents 7b731b8 + 6d56f8c commit 8719ff2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System.Reflection;
using System.Text.Json;
using Microsoft.Playwright;
using Umbraco.Community.Sustainability.Models;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ internal class SustainabilityComposer : IComposer
{
public void Compose(IUmbracoBuilder builder)
{
var exitCode = Microsoft.Playwright.Program.Main(new[] { "install" });
string value = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
Environment.SetEnvironmentVariable("PLAYWRIGHT_BROWSERS_PATH", $"{value}\\ms-playwright");

var exitCode = Microsoft.Playwright.Program.Main(new[] { "install", "chromium" });
if (exitCode != 0)
{
throw new Exception($"Playwright exited with code {exitCode}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Playwright" Version="1.40.0" />
<PackageReference Include="Microsoft.Playwright" Version="1.43.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
Expand Down

0 comments on commit 8719ff2

Please sign in to comment.