Skip to content

Commit d67c8d9

Browse files
committed
Fix remaining uses of Assembly.Location
1 parent 010c097 commit d67c8d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

RT.CommandLine/CommandLine.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System;
22
using System.Collections.Generic;
3-
using System.IO;
3+
using System.Diagnostics;
44
using System.Linq;
55
using System.Reflection;
66
using RT.Lingo;
@@ -493,7 +493,7 @@ internal static ConsoleColoredString GenerateHelp(CommandInfo cmd, int? wrapWidt
493493

494494
var helpString = new List<ConsoleColoredString>();
495495
var commandNameAttr = cmd.Type.GetCustomAttributes<CommandNameAttribute>().FirstOrDefault();
496-
string commandName = commandNameAttr == null ? Path.GetFileNameWithoutExtension(Assembly.GetEntryAssembly().Location) : "... " + commandNameAttr.Names.OrderByDescending(c => c.Length).First();
496+
string commandName = commandNameAttr == null ? Process.GetCurrentProcess().ProcessName : "... " + commandNameAttr.Names.OrderByDescending(c => c.Length).First();
497497

498498
//
499499
// ## CONSTRUCT THE “USAGE” LINE

0 commit comments

Comments
 (0)