Skip to content

Commit

Permalink
Now only adding current command line arguments if they exist.
Browse files Browse the repository at this point in the history
  • Loading branch information
ravibpatel committed Apr 29, 2023
1 parent 7796d0b commit 4c34c0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AutoUpdater.NET/DownloadUpdateDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ private void WebClientOnDownloadFileCompleted(object sender, AsyncCompletedEvent
}

string[] args = Environment.GetCommandLineArgs();
if (args.Length > 0)
if (args.Length > 1)
{
arguments.Add("--args");
arguments.Add(string.Join(" ", args.Skip(1).Select(arg => $"\"{arg}\"")));
Expand Down

0 comments on commit 4c34c0a

Please sign in to comment.