Skip to content

Commit

Permalink
Merge pull request #15670 from Luap99/debug
Browse files Browse the repository at this point in the history
proper --debug/-D flag support
  • Loading branch information
openshift-merge-robot authored Sep 7, 2022
2 parents 4577b68 + 8d40bf3 commit 31af486
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/podman/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,8 @@ func rootFlags(cmd *cobra.Command, opts *entities.PodmanConfig) {
pFlags.StringVar(&logLevel, logLevelFlagName, logLevel, fmt.Sprintf("Log messages above specified level (%s)", strings.Join(common.LogLevels, ", ")))
_ = rootCmd.RegisterFlagCompletionFunc(logLevelFlagName, common.AutocompleteLogLevel)

pFlags.BoolVar(&debug, "debug", false, "Docker compatibility, force setting of log-level")
_ = pFlags.MarkHidden("debug")
lFlags.BoolVarP(&debug, "debug", "D", false, "Docker compatibility, force setting of log-level")
_ = lFlags.MarkHidden("debug")

// Only create these flags for ABI connections
if !registry.IsRemote() {
Expand Down
2 changes: 2 additions & 0 deletions test/system/001-basic.bats
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ See 'podman version --help'" "podman version --remote"
run_podman --log-level=error info
run_podman --log-level=fatal info
run_podman --log-level=panic info
# docker compat
run_podman --debug info
run_podman -D info
run_podman 1 --debug --log-level=panic info
is "$output" "Setting --log-level and --debug is not allowed"
}
Expand Down

0 comments on commit 31af486

Please sign in to comment.