From d78bae8b4386eea170346ec28d51f3f9189f02d2 Mon Sep 17 00:00:00 2001 From: Rudi Date: Sun, 20 Jul 2025 21:14:17 +0200 Subject: [PATCH] hotfix --- commands/service/subcommands/talk.go | 6 +++--- services/parrot/main.go | 8 +++----- services/windowsServices.go | 2 ++ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/commands/service/subcommands/talk.go b/commands/service/subcommands/talk.go index 1dac42b..668c709 100644 --- a/commands/service/subcommands/talk.go +++ b/commands/service/subcommands/talk.go @@ -14,13 +14,13 @@ func Talk() *cli.Command { return &cli.Command{ Name: "talk", Usage: "talk with parrot", - Action: templateAction, + Action: talkAction, ArgsUsage: "send arg as message to parrot", } } -// templateAction logic for Template -func templateAction(context context.Context, c *cli.Command) error { +// talkAction logic for Template +func talkAction(context context.Context, c *cli.Command) error { conn, err := common.GetSocketConnection(common.ParrotServiceSocketPath) if err != nil { return err diff --git a/services/parrot/main.go b/services/parrot/main.go index 0964704..d806b83 100644 --- a/services/parrot/main.go +++ b/services/parrot/main.go @@ -11,11 +11,9 @@ var socketPath = common.ParrotServiceSocketPath func main() { services.BaseService(socketPath, func(command string, conn net.Conn) { - for range 2 { - _, err := conn.Write([]byte(command + "\n")) - if err != nil { - log.Println(err.Error()) - } + _, err := conn.Write([]byte(command)) + if err != nil { + log.Println(err.Error()) } }) } diff --git a/services/windowsServices.go b/services/windowsServices.go index 0e020e3..3ceaab8 100644 --- a/services/windowsServices.go +++ b/services/windowsServices.go @@ -7,6 +7,8 @@ package services import ( _ "embed" + "errors" + "github.com/DariusKlein/kleinCommand/common" "os" "os/exec" "syscall"