Skip to content

Commit

Permalink
Fix merge manifest error
Browse files Browse the repository at this point in the history
  • Loading branch information
JoonghyunCho committed Feb 5, 2024
1 parent 198bd60 commit 84a5f62
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions workload/src/Samsung.Tizen.Build.Tasks/MergeManifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.IO;
using System.Linq;
using System.Xml.Linq;

using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;

Expand All @@ -17,7 +16,7 @@ public class MergeManifest : Task

public ITaskItem[] SubManifestFileList
{
set
set
{
if (value != null)
subManifestFileList = value.ToList();
Expand Down Expand Up @@ -71,11 +70,25 @@ public override bool Execute()
}
else if (subapp.Name.LocalName == "privileges")
{
mainDoc.Root.Element(ns + "privileges").Add(subapp.Descendants(ns + "privilege"));
if (mainDoc.Root.Element(ns + "privileges") == null)
{
mainDoc.Root.Add(subapp);
}
else
{
mainDoc.Root.Element(ns + "privileges").Add(subapp.Descendants(ns + "privilege"));
}
}
else if (subapp.Name.LocalName == "account")
{
mainDoc.Root.Element(ns + "account").Add(subapp.Descendants(ns + "account-provider"));
if (mainDoc.Root.Element(ns + "account") == null)
{
mainDoc.Root.Add(subapp);
}
else
{
mainDoc.Root.Element(ns + "account").Add(subapp.Descendants(ns + "account-provider"));
}
}
else if (subapp.Name.LocalName == "feature")
{
Expand Down

0 comments on commit 84a5f62

Please sign in to comment.