Repository: louislam/uptime-kuma
File: extra/exe-builder/Program.cs (C#)

Code before:

                // Compare version, if the latest version is newer, then update
                if (new System.Version(latestVersionObj.latest).CompareTo(new System.Version(currentVersionObj.latest)) > 0) {
                    var result = MessageBox.Show("A new version is available. Do you want to update?", "Update", MessageBoxButtons.YesNo);
                    if (result == DialogResult.Yes) {
                        // Create a empty file `update`, so the app will download the core files again at startup
                        File.Create("update").Close();

                        trayIcon.Visible = false;
                        process?.Kill();

                        // Restart the app, it will download the core files again at startup
                        Application.Restart();
                    }
                } else {
                    MessageBox.Show("You are using the latest version.");
                }
            }


        }

        void VisitGitHub(object sender, EventArgs e) {
            if (intranetOnly)
            {
                MessageBox.Show("You have parsed in --intranet so we will not try to access the internet.");
                return;
            }

            Process.Start("https://github.com/louislam/uptime-kuma");
        }

        void About(object sender, EventArgs e)
        {
            MessageBox.Show("Uptime Kuma Windows Runtime v1.0.0" + Environment.NewLine + "© 2023 Louis Lam", "Info");
        }

        void Exit(object sender, EventArgs e)
        {
            // Hide tray icon, otherwise it will remain shown until user mouses over it
            trayIcon.Visible = false;
            process?.Kill();
            Application.Exit();
        }

        void ProcessExited(object sender, EventArgs e) {

            if (process.ExitCode != 0) {
                var line = "";
                while (!process.StandardOutput.EndOfStream)
                {

Review comment (suggestion):
`The --intranet argument was provided, so we will not try to access the internet.` should already be in the log => I don't see why logging this again has additional value

```suggestion
```

Code after:
                        File.Create("update").Close();

                        trayIcon.Visible = false;
                        process?.Kill();

                        // Restart the app, it will download the core files again at startup
                        Application.Restart();
                    }
                } else {
                    MessageBox.Show("You are using the latest version.");
                }
            }


        }

        void VisitGitHub(object sender, EventArgs e) {
            if (intranetOnly) {
                MessageBox.Show("You have parsed in --intranet so we will not try to access the internet or visit github.com, please go to https://github.com/louislam/uptime-kuma if you want to visit github.");
                return;
            }

            Process.Start("https://github.com/louislam/uptime-kuma");
        }

        void About(object sender, EventArgs e)
        {
            MessageBox.Show("Uptime Kuma Windows Runtime v1.0.0" + Environment.NewLine + "© 2023 Louis Lam", "Info");
        }

        void Exit(object sender, EventArgs e)
        {
            // Hide tray icon, otherwise it will remain shown until user mouses over it
            trayIcon.Visible = false;
            process?.Kill();
            Application.Exit();
        }

        void ProcessExited(object sender, EventArgs e) {

            if (process.ExitCode != 0) {
                var line = "";
                while (!process.StandardOutput.EndOfStream)
                {
                    line += process.StandardOutput.ReadLine();
                }

                MessageBox.Show("Uptime Kuma exited unexpectedly. Exit code: " + process.ExitCode + " " + line);
            }

            trayIcon.Visible = false;