mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 23:56:56 +00:00
GODT-1523: Reduce unnecessary shell executions. Inspired by @kortschak.
- check opened file descriptors - detection of darwin version - detection of apple interface color theme - test for update sync (copy files) - replace exec with execabs
This commit is contained in:
@ -19,10 +19,10 @@ package base
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/sys/execabs"
|
||||
)
|
||||
|
||||
// maxAllowedRestarts controls after how many crashes the app will give up restarting.
|
||||
@ -43,7 +43,7 @@ func (b *Base) restartApp(crash bool) error {
|
||||
WithField("args", args).
|
||||
Warn("Restarting")
|
||||
|
||||
return exec.Command(b.command, args...).Start() //nolint:gosec
|
||||
return execabs.Command(b.command, args...).Start() //nolint:gosec
|
||||
}
|
||||
|
||||
// incrementRestartFlag increments the value of the restart flag.
|
||||
|
||||
Reference in New Issue
Block a user