Skip to content

Commit 26cab4a

Browse files
committed
fix(security): hide console window only in Windows
1 parent 35bd244 commit 26cab4a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

security.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import (
2323
"runtime"
2424
"sort"
2525
"strings"
26-
"syscall"
2726
"time"
2827

2928
"go.mozilla.org/pkcs7"
@@ -489,7 +488,7 @@ func loadSystemRoots() (*x509.CertPool, error) {
489488
// Use certutil to download all the root certs.
490489
if needSync {
491490
cmd := exec.Command("certutil", "-syncWithWU", dir)
492-
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
491+
hideWindow(cmd)
493492
out, err := cmd.Output()
494493
if err != nil {
495494
return roots, err

0 commit comments

Comments
 (0)