From 85cd814484494dadf0f842ca9b0e14217afad7ba Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Mon, 11 Jan 2021 21:55:35 +0100 Subject: [PATCH] Adding chdir parameter --- Kyoo/Program.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Kyoo/Program.cs b/Kyoo/Program.cs index dfda8f1e..8f26b2fc 100644 --- a/Kyoo/Program.cs +++ b/Kyoo/Program.cs @@ -2,6 +2,7 @@ using System; using System.Threading.Tasks; using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; +using Microsoft.VisualBasic.FileIO; namespace Kyoo { @@ -9,7 +10,9 @@ namespace Kyoo { public static async Task Main(string[] args) { - Console.WriteLine($"Running as: {Environment.UserName}"); + if (args.Length > 0) + FileSystem.CurrentDirectory = args[0]; + Console.WriteLine($"Running as {Environment.UserName} in {FileSystem.CurrentDirectory}."); await CreateWebHostBuilder(args).Build().RunAsync(); }