mirror of
https://github.com/openshift/openshift-mcp-server.git
synced 2025-10-17 14:27:48 +03:00
fix(cmd): SIGTERM shouldn't print errors
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/manusa/kubernetes-mcp-server/pkg/mcp"
|
||||
"github.com/manusa/kubernetes-mcp-server/pkg/version"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
@@ -26,7 +28,7 @@ Kubernetes Model Context Protocol (MCP) server
|
||||
fmt.Println(version.Version)
|
||||
return
|
||||
}
|
||||
if err := mcp.NewSever().ServeStdio(); err != nil {
|
||||
if err := mcp.NewSever().ServeStdio(); err != nil && !errors.Is(err, context.Canceled) {
|
||||
panic(err)
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user