Skip to content

Commit

Permalink
Applied changes from @Trenly's review.
Browse files Browse the repository at this point in the history
  • Loading branch information
jedieaston committed Jan 27, 2022
1 parent 3bcafe0 commit 16d4318
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions src/WingetCreateCore/Common/PackageParser.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft. All rights reserved.
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license.

namespace Microsoft.WingetCreateCore
Expand Down Expand Up @@ -650,26 +650,9 @@ private static bool ParseExeInstallerType(string path, Installer baseInstaller,
/// <returns>A boolean.</returns>
private static bool IsWix(QDatabase installer)
{
// Do any of the WiX properties exist?
foreach (var property in installer.Properties)
{
if (property.Property.ToLower().Contains("wix"))
{
return true;
}
}

// Do any of the WiX tables exist?
foreach (var table in installer.Tables)
{
if (table.Name.ToLower().Contains("wix"))
{
return true;
}
}

// Does the CreatingApp mention WiX?
return
Array.Exists(installer.Tables.ToArray(), table => table.Name.ToLower().Contains("wix")) ||
Array.Exists(installer.Properties.ToArray(), property => property.Property.ToLower().Contains("wix") || property.Value.ToLower().Contains("wix")) ||
installer.SummaryInfo.CreatingApp.ToLower().Contains("wix") ||
installer.SummaryInfo.CreatingApp.ToLower().Contains("windows installer xml");
}
Expand Down

0 comments on commit 16d4318

Please sign in to comment.