Skip to content

Commit

Permalink
fix bash completion on mgrctl
Browse files Browse the repository at this point in the history
  • Loading branch information
mbussolotto committed Oct 30, 2024
1 parent dfc1610 commit 1172829
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mgrctl/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ func NewUyunictlCommand() *cobra.Command {
rootCmd.PersistentFlags().StringVar(&globalFlags.LogLevel, "logLevel", "", L("application log level")+"(trace|debug|info|warn|error|fatal|panic)")

rootCmd.PersistentPreRun = func(cmd *cobra.Command, args []string) {
utils.LogInit((cmd.Name() != "exec" && cmd.Name() != "term") || globalFlags.LogLevel == "trace")
utils.SetLogLevel(globalFlags.LogLevel)

// do not log if running the completion cmd as the output is redirect to create a file to source
if cmd.Name() != "completion" {
utils.LogInit((cmd.Name() != "exec" && cmd.Name() != "term") || globalFlags.LogLevel == "trace")
utils.SetLogLevel(globalFlags.LogLevel)
log.Info().Msgf(L("Welcome to %s"), name)
log.Info().Msgf(L("Executing command: %s"), cmd.Name())
}
Expand Down
1 change: 1 addition & 0 deletions uyuni-tools.changes.mbussolotto.mgrct_bash
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- fix bash completion on mgrctl

0 comments on commit 1172829

Please sign in to comment.