mirror of
https://github.com/safing/portmaster
synced 2025-09-01 18:19:12 +00:00
Fix --short not working correctly
This commit is contained in:
parent
81c6ed2906
commit
8754eabfe0
1 changed files with 3 additions and 2 deletions
|
@ -33,6 +33,7 @@ var versionCmd = &cobra.Command{
|
|||
if !showAllVersions {
|
||||
if showShortVersion {
|
||||
fmt.Println(info.Version())
|
||||
return nil
|
||||
}
|
||||
|
||||
fmt.Println(info.FullVersion())
|
||||
|
@ -40,7 +41,7 @@ var versionCmd = &cobra.Command{
|
|||
}
|
||||
|
||||
fmt.Printf("portmaster-start %s\n\n", info.Version())
|
||||
fmt.Printf("Components:\n")
|
||||
fmt.Printf("Assets:\n")
|
||||
|
||||
all := registry.Export()
|
||||
keys := make([]string, 0, len(all))
|
||||
|
@ -72,7 +73,7 @@ func init() {
|
|||
flags := versionCmd.Flags()
|
||||
{
|
||||
flags.BoolVar(&showShortVersion, "short", false, "Print only the version number.")
|
||||
flags.BoolVar(&showAllVersions, "all", false, "Dump versions for all components.")
|
||||
flags.BoolVar(&showAllVersions, "all", false, "Dump versions for all assets.")
|
||||
}
|
||||
|
||||
rootCmd.AddCommand(versionCmd)
|
||||
|
|
Loading…
Add table
Reference in a new issue