Fix not printing errror message

The CLI should print errors to stderr, and not write to the log file.
pull/128/head
Lorenz 3 years ago committed by GitHub
parent 95e82fcbfd
commit 4853c5c8d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3,7 +3,6 @@ package main
import (
"flag"
"fmt"
"log"
"os"
"github.com/lawl/pulseaudio"
@ -30,7 +29,7 @@ func doCLI(config *config, librnnoise string) {
paClient, err := pulseaudio.NewClient()
if err != nil {
log.Printf("Couldn't create pulseaudio client: %v\n", err)
fmt.Fprintf(os.Stderr, "Couldn't create pulseaudio client: %v\n", err)
os.Exit(1)
}
defer paClient.Close()

Loading…
Cancel
Save