Skip to content

Commit cbb033c

Browse files
author
Jason Zhai
committed
Remove duplicate node
1 parent 7aa3163 commit cbb033c

File tree

3 files changed

+0
-31
lines changed

3 files changed

+0
-31
lines changed

src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.Designer.cs

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Containers/Microsoft.NET.Build.Containers/Resources/Strings.resx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,4 @@
489489
<value>CONTAINER2031: The container image format '{0}' is not supported. Supported formats are '{1}'.</value>
490490
<comment>{StrBegins="CONTAINER2031: "}</comment>
491491
</data>
492-
<data name="InvalidContainerImageFormat" xml:space="preserve">
493-
<value>CONTAINER2031: The container image format '{0}' is not supported. Supported formats are '{1}'.</value>
494-
<comment>{StrBegins="CONTAINER2031: "}</comment>
495-
</data>
496492
</root>

src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -143,24 +143,6 @@ internal async Task<bool> ExecuteAsync(CancellationToken cancellationToken)
143143
}
144144
}
145145

146-
// forcibly change the media type if required
147-
if (ImageFormat is not null)
148-
{
149-
if (Enum.TryParse<KnownImageFormats>(ImageFormat, out var imageFormat))
150-
{
151-
imageBuilder.ManifestMediaType = imageFormat switch
152-
{
153-
KnownImageFormats.Docker => SchemaTypes.DockerManifestV2,
154-
KnownImageFormats.OCI => SchemaTypes.OciManifestV1,
155-
_ => imageBuilder.ManifestMediaType // should be impossible unless we add to the enum
156-
};
157-
}
158-
else
159-
{
160-
Log.LogErrorWithCodeFromResources(nameof(Strings.InvalidContainerImageFormat), ImageFormat, string.Join(",", Enum.GetValues<KnownImageFormats>()));
161-
}
162-
}
163-
164146
Layer newLayer = Layer.FromDirectory(PublishDirectory, WorkingDirectory, imageBuilder.IsWindows, imageBuilder.ManifestMediaType);
165147
imageBuilder.AddLayer(newLayer);
166148
imageBuilder.SetWorkingDirectory(WorkingDirectory);

0 commit comments

Comments
 (0)