Fix lock copying in handle_error function.
Changed handle_error to accept *Barnard pointer instead of copying struct by value, eliminating race condition warnings from mutex copying. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
6
main.go
6
main.go
@@ -196,12 +196,12 @@ func main() {
|
||||
if err != nil {
|
||||
b.exitMessage = err.Error()
|
||||
b.exitStatus = 1
|
||||
handle_error(b)
|
||||
handle_error(&b)
|
||||
}
|
||||
b.notifyChannel = setup_notify_runner(*b.UserConfig.GetNotifyCommand())
|
||||
b.Ui = uiterm.New(&b)
|
||||
b.Ui.Run(reader)
|
||||
handle_error(b)
|
||||
handle_error(&b)
|
||||
}
|
||||
|
||||
func handle_raw_error(e error) {
|
||||
@@ -209,7 +209,7 @@ func handle_raw_error(e error) {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
func handle_error(b Barnard) {
|
||||
func handle_error(b *Barnard) {
|
||||
if b.exitMessage != "" {
|
||||
fmt.Fprintf(os.Stderr, "%s\n", b.exitMessage)
|
||||
}
|
||||
|
Reference in New Issue
Block a user