Skip to content

Commit a1c8dfa

Browse files
committed
version and better stop process response
1 parent f308b7e commit a1c8dfa

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

backend/cmd/VERSION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.6
1+
2.2.8

updater/main.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,14 @@ func isProcessRunning(processName string) (bool, error) {
9393
return strings.Contains(string(output), processName), nil
9494
}
9595

96-
// Stop a process by its name
9796
func stopProcess(processName string) error {
9897
cmd := exec.Command("taskkill", "/IM", processName, "/F")
99-
cmd.Stdout = os.Stdout
100-
cmd.Stderr = os.Stderr
101-
return cmd.Run()
98+
output, err := cmd.CombinedOutput()
99+
if err != nil {
100+
return fmt.Errorf("taskkill failed: %v - output: %s", err, output)
101+
}
102+
fmt.Printf("Process %s stopped successfully.\n", processName)
103+
return nil
102104
}
103105

104106
func updateFromBinaries(osType string) {

0 commit comments

Comments
 (0)