From 743fcb256ecc006a206b6024884fd5cf9517364b Mon Sep 17 00:00:00 2001 From: u5surf Date: Tue, 23 Dec 2025 19:03:12 +0900 Subject: [PATCH] Fix no need mirror be set --version and --help --- cmd/root.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/root.go b/cmd/root.go index 7fc49f31d5..1cdbf27eba 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -78,6 +78,12 @@ the latest stable version will be downloaded from the repository.`, return nil }, PersistentPreRunE: func(cmd *cobra.Command, args []string) error { + if len(args) != 0 { + switch args[0] { + case "--help", "-h", "--version", "-v": + return nil + } + } switch cmd.Name() { case "init", "rotate", "set": if cmd.HasParent() && cmd.Parent().Name() == "mirror" {