Skip to content

Commit

Permalink
Make command line invocation more clear
Browse files Browse the repository at this point in the history
  • Loading branch information
Shai committed Jul 30, 2021
1 parent fc417a3 commit eb31e99
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Luafuck/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ class Program
static void Main(string[] args)
{
string originalFilePath = args.FirstOrDefault();
if(originalFilePath == null)
if(originalFilePath == null || args.Contains("-h"))
{
Console.WriteLine("Missing command line argument: Lua script path");
Console.WriteLine($"Usage: {System.AppDomain.CurrentDomain.FriendlyName} <input_lua_script_path>");
return;
}
if(!File.Exists(originalFilePath))
{
Console.WriteLine($"No such file '{originalFilePath}'");
return;
}

Expand Down

0 comments on commit eb31e99

Please sign in to comment.