Skip to content

Commit

Permalink
Merge pull request #346 from reptail/master
Browse files Browse the repository at this point in the history
Updated to allow running Non-Interactive mode from command line.
  • Loading branch information
sim0n00ps authored May 5, 2024
2 parents 2014a70 + 26e1ef3 commit d931a5a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion OF DL/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static Program()
m_DownloadHelper = new DownloadHelper();
}

public async static Task Main()
public async static Task Main(string[] args)
{
try
{
Expand Down Expand Up @@ -222,6 +222,13 @@ public async static Task Main()
return;
}

if (args is not null && args.Length > 0)
{
const string NON_INTERACTIVE_ARG = "--non-interactive";

if (args.Any(a => NON_INTERACTIVE_ARG.Equals(NON_INTERACTIVE_ARG, StringComparison.OrdinalIgnoreCase)))
Config.NonInteractiveMode = true;
}

AnsiConsole.Markup($"[green]Logged In successfully as {validate.name} {validate.username}\n[/]");
await DownloadAllData();
Expand Down

0 comments on commit d931a5a

Please sign in to comment.