Skip to content

Commit

Permalink
Merge pull request #92 from local-deploy/DL-T-102
Browse files Browse the repository at this point in the history
feat(commands): adding a short version flag
  • Loading branch information
varrcan authored Jun 29, 2023
2 parents 12a472f + de0e16a commit 87902b7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions command/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/docker/compose/v2/pkg/progress"
"github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)

var (
Expand Down Expand Up @@ -33,6 +34,8 @@ func Execute() {
rootCmd.DisableAutoGenTag = true
rootCmd.PersistentFlags().BoolVar(&debug, "debug", false, "Show more output")

rootCmd.Version = viper.GetString("version")

rootCmd.PersistentPreRun = func(cmd *cobra.Command, args []string) {
if debug {
logrus.SetLevel(logrus.DebugLevel)
Expand Down

0 comments on commit 87902b7

Please sign in to comment.