Skip to content

Commit f99cb9e

Browse files
authored
Merge pull request #312 from tynar/master
Fix not showing correct header info, issue #34
2 parents 8930598 + 42db97c commit f99cb9e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/CommandLine/Text/HeadingInfo.cs

+9-1
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,16 @@ public static HeadingInfo Default
5757
{
5858
var title = ReflectionHelper.GetAttribute<AssemblyTitleAttribute>()
5959
.MapValueOrDefault(
60-
titleAttribute => Path.GetFileNameWithoutExtension(titleAttribute.Title),
60+
titleAttribute =>
61+
{
62+
if (titleAttribute.Title.ToLowerInvariant().EndsWith(".dll"))
63+
{
64+
return titleAttribute.Title.Substring(0, titleAttribute.Title.Length - ".dll".Length);
65+
}
66+
return titleAttribute.Title;
67+
},
6168
ReflectionHelper.GetAssemblyName());
69+
6270
var version = ReflectionHelper.GetAttribute<AssemblyInformationalVersionAttribute>()
6371
.MapValueOrDefault(
6472
versionAttribute => versionAttribute.InformationalVersion,

0 commit comments

Comments
 (0)