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:
Jakub
2022-05-26 11:35:15 +02:00
committed by Jakub Cuth
parent f40f002bf9
commit e3fe33245e
18 changed files with 245 additions and 125 deletions

View File

@ -17,10 +17,10 @@
package tls
import "os/exec"
import "golang.org/x/sys/execabs"
func addTrustedCert(certPath string) error {
return exec.Command( //nolint:gosec
return execabs.Command( //nolint:gosec
"/usr/bin/security",
"execute-with-privileges",
"/usr/bin/security",
@ -34,7 +34,7 @@ func addTrustedCert(certPath string) error {
}
func removeTrustedCert(certPath string) error {
return exec.Command( //nolint:gosec
return execabs.Command( //nolint:gosec
"/usr/bin/security",
"execute-with-privileges",
"/usr/bin/security",