Skip to content

Commit

Permalink
bring version flag back for kubectl plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
wlan0 committed Jun 17, 2021
1 parent 488976a commit f1e0cf4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/kubectl-direct_csi/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ var (
identity = "direct.csi.min.io"
dryRun = false
dryRunFlagName = "dry-run"
showVersion = false

//output modes
outputMode = ""
Expand All @@ -49,6 +48,7 @@ var pluginCmd = &cobra.Command{
Short: "Plugin for managing Direct CSI drives and volumes",
SilenceUsage: true,
SilenceErrors: false,
Version: Version,
PersistentPreRunE: func(c *cobra.Command, args []string) error {
switch outputMode {
case "":
Expand All @@ -66,8 +66,8 @@ var pluginCmd = &cobra.Command{
}

func init() {
if Version == "" {
Version = "dev"
if pluginCmd.Version == "" {
pluginCmd.Version = "dev"
}

viper.AutomaticEnv()
Expand Down

0 comments on commit f1e0cf4

Please sign in to comment.