Skip to content

Commit 9ad3497

Browse files
committed
feat: handle debugging flag on CLI
1 parent bf2c183 commit 9ad3497

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

WiiLink-Patcher-CLI/WiiLink_Patcher.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class WiiLink_Patcher
4444
static string curCmd = "";
4545
static readonly string curDir = Directory.GetCurrentDirectory();
4646
static readonly string tempDir = Path.Join(Path.GetTempPath(), "WiiLink_Patcher");
47-
static readonly bool DEBUG_MODE = false;
47+
static bool DEBUG_MODE = false;
4848
static PatcherLanguage patcherLang = PatcherLanguage.en;
4949
static JObject? localizedText = null;
5050

@@ -3977,6 +3977,12 @@ static void ExitApp()
39773977

39783978
static async System.Threading.Tasks.Task Main(string[] args)
39793979
{
3980+
// Check for debugging flag
3981+
bool debugArgExists = Array.Exists(args, element => element.ToLower() == "--debug");
3982+
3983+
// Set DEBUG_MODE
3984+
DEBUG_MODE = debugArgExists;
3985+
39803986
// Set console encoding to UTF-8
39813987
Console.OutputEncoding = Encoding.UTF8;
39823988

0 commit comments

Comments
 (0)