summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-09-07 17:07:56 +0200
committerGitHub <noreply@github.com>2022-09-07 17:07:56 +0200
commit31af4863626f211bb8f963da6a0392273f507680 (patch)
tree6a48b55aaf41ea0fc99c5eead846b01813f8a866
parent4577b68b5a93d1eada0744051d29663fb3c5654e (diff)
parent8d40bf3f14c67122a138a687751f903611f24d59 (diff)
downloadpodman-31af4863626f211bb8f963da6a0392273f507680.tar.gz
podman-31af4863626f211bb8f963da6a0392273f507680.tar.bz2
podman-31af4863626f211bb8f963da6a0392273f507680.zip
Merge pull request #15670 from Luap99/debug
proper --debug/-D flag support
-rw-r--r--cmd/podman/root.go4
-rw-r--r--test/system/001-basic.bats2
2 files changed, 4 insertions, 2 deletions
diff --git a/cmd/podman/root.go b/cmd/podman/root.go
index f45dc94b2..0261cd670 100644
--- a/cmd/podman/root.go
+++ b/cmd/podman/root.go
@@ -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() {
diff --git a/test/system/001-basic.bats b/test/system/001-basic.bats
index 584511388..1148aaae7 100644
--- a/test/system/001-basic.bats
+++ b/test/system/001-basic.bats
@@ -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"
}