Skip to content

Commit

Permalink
fix(security): hide console window only in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
LordNoteworthy committed Feb 13, 2024
1 parent 35bd244 commit 26cab4a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions security.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"runtime"
"sort"
"strings"
"syscall"
"time"

"go.mozilla.org/pkcs7"
Expand Down Expand Up @@ -489,7 +488,7 @@ func loadSystemRoots() (*x509.CertPool, error) {
// Use certutil to download all the root certs.
if needSync {
cmd := exec.Command("certutil", "-syncWithWU", dir)
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true}
hideWindow(cmd)

Check failure on line 491 in security.go

View workflow job for this annotation

GitHub Actions / Build & Test (1.16.x, ubuntu-latest)

undefined: hideWindow

Check failure on line 491 in security.go

View workflow job for this annotation

GitHub Actions / Build & Test (1.16.x, macos-latest)

undefined: hideWindow

Check failure on line 491 in security.go

View workflow job for this annotation

GitHub Actions / Build & Test (1.16.x, windows-latest)

undefined: hideWindow

Check failure on line 491 in security.go

View workflow job for this annotation

GitHub Actions / Build & Test (1.17.x, ubuntu-latest)

undefined: hideWindow

Check failure on line 491 in security.go

View workflow job for this annotation

GitHub Actions / Build & Test (1.17.x, macos-latest)

undefined: hideWindow

Check failure on line 491 in security.go

View workflow job for this annotation

GitHub Actions / Build & Test (1.17.x, windows-latest)

undefined: hideWindow

Check failure on line 491 in security.go

View workflow job for this annotation

GitHub Actions / Build & Test (1.18.x, ubuntu-latest)

undefined: hideWindow

Check failure on line 491 in security.go

View workflow job for this annotation

GitHub Actions / Build & Test (1.18.x, macos-latest)

undefined: hideWindow

Check failure on line 491 in security.go

View workflow job for this annotation

GitHub Actions / Build & Test (1.18.x, windows-latest)

undefined: hideWindow

Check failure on line 491 in security.go

View workflow job for this annotation

GitHub Actions / Build & Test (1.19.x, ubuntu-latest)

undefined: hideWindow

Check failure on line 491 in security.go

View workflow job for this annotation

GitHub Actions / Build & Test (1.19.x, macos-latest)

undefined: hideWindow

Check failure on line 491 in security.go

View workflow job for this annotation

GitHub Actions / Build & Test (1.19.x, windows-latest)

undefined: hideWindow
out, err := cmd.Output()
if err != nil {
return roots, err
Expand Down

0 comments on commit 26cab4a

Please sign in to comment.