1 Commits

Author SHA1 Message Date
urania eba478471f fix: --v
build-and-release / release (push) Successful in 2m3s
2026-06-22 19:29:04 +02:00
2 changed files with 7 additions and 0 deletions
+7
View File
@@ -50,6 +50,8 @@ func main() {
configFlag := fs.String("f", "", "config file path") configFlag := fs.String("f", "", "config file path")
fs.StringVar(configFlag, "config", "", "alias for -f") fs.StringVar(configFlag, "config", "", "alias for -f")
saveConfig := fs.Bool("save-config", false, "write default config and exit") saveConfig := fs.Bool("save-config", false, "write default config and exit")
showVersion := fs.Bool("v", false, "print version and exit")
fs.BoolVar(showVersion, "version", false, "alias for -v")
rest := os.Args[1:] rest := os.Args[1:]
var args []string var args []string
@@ -63,6 +65,11 @@ func main() {
rest = rest[1:] rest = rest[1:]
} }
if *showVersion {
fmt.Println(nadir.Version)
os.Exit(0)
}
if *configFlag != "" { if *configFlag != "" {
os.Setenv("CONFIG_PATH", *configFlag) os.Setenv("CONFIG_PATH", *configFlag)
} }
Binary file not shown.