Remove logs and use Run instead of Start
This commit is contained in:
parent
17969495fd
commit
0f19f3d7c5
12
gotifier.go
12
gotifier.go
|
@ -1,7 +1,7 @@
|
||||||
package gotifier
|
package gotifier
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
//"log"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -15,15 +15,15 @@ type Notification struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (notif Notification) Push() bool {
|
func (notif Notification) Push() bool {
|
||||||
log.Println("Pushing notification")
|
//log.Println("Pushing notification")
|
||||||
if activeCmd == nil {
|
if activeCmd == nil {
|
||||||
log.Println("No active notification command found")
|
//log.Println("No active notification command found")
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
cmd := (*activeCmd).Command(notif)
|
cmd := (*activeCmd).Command(notif)
|
||||||
|
|
||||||
cmd.Start()
|
cmd.Run()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,13 +81,13 @@ func nonNull(vals ...string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
log.Println("Initing Gotifier")
|
//log.Println("Initing Gotifier")
|
||||||
for _, cmd := range notifiers {
|
for _, cmd := range notifiers {
|
||||||
path, err := exec.LookPath(cmd.Name)
|
path, err := exec.LookPath(cmd.Name)
|
||||||
if err == nil && path != "" {
|
if err == nil && path != "" {
|
||||||
activeCmd = &cmd
|
activeCmd = &cmd
|
||||||
activeCmd.Path = path
|
activeCmd.Path = path
|
||||||
log.Println("Found notifier command: " + path)
|
//log.Println("Found notifier command: " + path)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue