Skip to content

Commit ada7c1b

Browse files
authored
edssharp: use the basename of the argv0 for the usage output (#178)
The code was hardcoded to EDSEditor but the compiled code was EDSSharp and so just cleanup the code to handle that case Before: Usage: EDSEditor --infile file.[xdd|eds] --outfile [valid output file] \ [OPTIONAL] --type [exporter type] After: Usage: EDSSharp --infile file.[xdd|eds] --outfile [valid output file] \ [OPTIONAL] --type [exporter type] Signed-off-by: Charles Hardin <charles.hardin@redoxblox.com>
1 parent ee517a2 commit ada7c1b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

EDSSharp/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ static ExporterDescriptor FindMatchingExporter(string outpath, string outType)
174174

175175
static void PrintHelpText()
176176
{
177-
Console.WriteLine("Usage: EDSEditor --infile file.[xdd|eds] --outfile [valid output file] [OPTIONAL] --type [exporter type]");
177+
string name = Path.GetFileNameWithoutExtension(Environment.GetCommandLineArgs()[0]);
178+
Console.WriteLine($"Usage: {name} --infile file.[xdd|eds] --outfile [valid output file] [OPTIONAL] --type [exporter type]");
178179
Console.WriteLine("The output file format depends on --outfile extension and --type");
179180
Console.WriteLine("If --outfile extension matcher one exporter then --type IS NOT needed");
180181
Console.WriteLine("If --outfile extension matcher multiple exporter then --type IS needed");

0 commit comments

Comments
 (0)