From d087678628b00e6bfcff4f5c16fec8ebab5cea75 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sat, 4 Jan 2025 12:36:33 +0200 Subject: [PATCH] Disallow using -remember-password and -qr without -username --- DepotDownloader/Program.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/DepotDownloader/Program.cs b/DepotDownloader/Program.cs index 98fb50d6..d9d45704 100644 --- a/DepotDownloader/Program.cs +++ b/DepotDownloader/Program.cs @@ -65,6 +65,21 @@ namespace DepotDownloader ContentDownloader.Config.RememberPassword = HasParameter(args, "-remember-password"); ContentDownloader.Config.UseQrCode = HasParameter(args, "-qr"); + if (username == null) + { + if (ContentDownloader.Config.RememberPassword) + { + Console.WriteLine("Error: -remember-password can not be used without -username."); + return 1; + } + + if (ContentDownloader.Config.UseQrCode) + { + Console.WriteLine("Error: -qr can not be used without -username."); + return 1; + } + } + ContentDownloader.Config.DownloadManifestOnly = HasParameter(args, "-manifest-only"); var cellId = GetParameter(args, "-cellid", -1);