fix: open GUI when relaunched instead of printing error (fixes #10727) (#10852)

This is primarily to improve the experience in environments that start
Syncthing from a graphical environment, e.g., Windows.

When already running, instead of printing an error we open the GUI. If
the GUI is not available (but the lockfile indicates we are running),
print an error and exit.

If --no-browser is given or STNOBROWSER is set, act like before.

Closes #10736. Marking as `fix` because this does not deserve to trigger
a minor release on its own.

---------

Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Jakob Borg
2026-08-11 11:17:09 +00:00
committed by GitHub
parent 42ea7231c5
commit 058bcd7334
3 changed files with 64 additions and 38 deletions
+1
View File
@@ -88,6 +88,7 @@ const (
ExitNoUpgradeAvailable ExitStatus = 2
ExitRestart ExitStatus = 3
ExitUpgrade ExitStatus = 4
ExitNoRestart ExitStatus = 5 // do not get restarted by monitor
)
func (s ExitStatus) AsInt() int {