1
0

Prevent dups in fragments

This commit is contained in:
nicolas.dorier
2019-03-19 02:50:16 +09:00
parent f28fba6293
commit 1f4c2d5d72

View File

@@ -31,7 +31,7 @@ namespace DockerGenerator
fragmentLocation = FindRoot(fragmentLocation); fragmentLocation = FindRoot(fragmentLocation);
fragmentLocation = Path.GetFullPath(Path.Combine(fragmentLocation, "docker-fragments")); fragmentLocation = Path.GetFullPath(Path.Combine(fragmentLocation, "docker-fragments"));
var fragments = new List<string>(); var fragments = new HashSet<string>();
switch (composition.SelectedProxy) switch (composition.SelectedProxy)
{ {
case "nginx": case "nginx":
@@ -72,8 +72,7 @@ namespace DockerGenerator
{ {
fragments.Add(fragment.Trim()); fragments.Add(fragment.Trim());
} }
var def = new DockerComposeDefinition(name, fragments.ToList());
var def = new DockerComposeDefinition(name, fragments);
def.FragmentLocation = fragmentLocation; def.FragmentLocation = fragmentLocation;
def.BuildOutputDirectory = output; def.BuildOutputDirectory = output;
def.Build(); def.Build();