From f5149861432b8c93d3a0b6e08d46a71b9974dcf0 Mon Sep 17 00:00:00 2001 From: andig Date: Tue, 3 Feb 2026 17:56:06 +0100 Subject: [PATCH] chore: fix ctrl-c aborts server --- cmd/root.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/root.go b/cmd/root.go index 289851a08..bbf6cc789 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -56,9 +56,11 @@ var ( runAsService bool ) +const rootName = "evcc" + // rootCmd represents the base command when called without any subcommands var rootCmd = &cobra.Command{ - Use: "evcc", + Use: rootName, Short: "evcc - open source solar charging", Version: util.FormattedVersion(), Run: runRoot, @@ -135,7 +137,7 @@ func Execute() { } func allowCtrlC(cmd *cobra.Command, args []string) { - if cmd.Name() == "root" { + if cmd.Name() == rootName { return }