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
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
@@ -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 (
@@ -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)

0 comments on commit 87902b7

Please sign in to comment.