diff --git a/fix.txt b/fix.txt index 930318f..f095897 100644 --- a/fix.txt +++ b/fix.txt @@ -261,7 +261,7 @@ Priority 3: configuration, UI, and binding hardening Add checked wrapper operations for lifecycle-critical calls and surface actionable errors to Barnard. -34. Beep helpers panic when the external command is absent +[x] 34. Beep helpers panic when the external command is absent Files: ui.go, gumble/gumbleopenal/stream.go Both helpers panic on exec failure. Return/log an error or remove unused helpers; a missing optional beep binary must not terminate Barnard. diff --git a/gumble/gumbleopenal/stream.go b/gumble/gumbleopenal/stream.go index a9cb4b9..46697db 100644 --- a/gumble/gumbleopenal/stream.go +++ b/gumble/gumbleopenal/stream.go @@ -4,7 +4,6 @@ import ( "encoding/binary" "errors" "math" - "os/exec" "runtime" "sync" "sync/atomic" @@ -46,16 +45,6 @@ var ( ErrOutputDevice = errors.New("gumbleopenal: invalid output device or parameters") ) -func beep() { - cmd := exec.Command("beep") - cmdout, err := cmd.Output() - if err != nil { - panic(err) - } - if cmdout != nil { - } -} - type renderCommand struct { fn func() done chan struct{} diff --git a/ui.go b/ui.go index 8dca8a5..aa8b820 100644 --- a/ui.go +++ b/ui.go @@ -3,7 +3,6 @@ package main import ( "fmt" "os" - "os/exec" "strings" "time" @@ -24,16 +23,6 @@ const ( uiViewAdmin = "admin" ) -func Beep() { - cmd := exec.Command("beep") - cmdout, err := cmd.Output() - if err != nil { - panic(err) - } - if cmdout != nil { - } -} - func esc(str string) string { return sanitize.HTML(str) } @@ -42,10 +31,6 @@ func (b *Barnard) Notify(event string, who string, what string) { b.notifyChannel <- []string{event, who, what} } -func (b *Barnard) Beep() { - Beep() -} - func (b *Barnard) SetSelectedUser(user *gumble.User) { b.selectedUser = user if user == nil {