mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-15 22:56:48 +00:00
GODT-2150: fixed initial implementation that filtered --no-window in gui instead of bridge.
This commit is contained in:
@ -77,7 +77,7 @@ func (restarter *Restarter) Restart() {
|
||||
//nolint:gosec
|
||||
cmd := execabs.Command(
|
||||
restarter.exe,
|
||||
xslices.Join(removeFlagWithValue(os.Args[1:], "parent-pid"), restarter.flags)...,
|
||||
xslices.Join(removeFlagWithValue(removeFlag(os.Args[1:], "no-window"), "parent-pid"), restarter.flags)...,
|
||||
)
|
||||
|
||||
l := logrus.WithFields(logrus.Fields{
|
||||
@ -156,3 +156,7 @@ func removeFlagWithValue(argList []string, flag string) []string {
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
func removeFlag(argList []string, flag string) []string {
|
||||
return xslices.Filter(argList, func(arg string) bool { return (arg != "-"+flag) && (arg != "--"+flag) })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user