From 02af4f8bd6fbb915b11615e22bb1f89e399c8afb Mon Sep 17 00:00:00 2001 From: marinmo Date: Sun, 23 Jun 2024 02:04:13 +0200 Subject: [PATCH] Update warning message when using external compose provider Change the warning message at runtime to refer to the man page of podman-compose instead of "the documentation" Add instructions in the man page on how to disable the warning emitted by podman-compose when using an external compose provider Signed-off-by: marinmo --- cmd/podman/compose.go | 2 +- docs/source/markdown/podman-compose.1.md.in | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/podman/compose.go b/cmd/podman/compose.go index cd764e5c61..869cbbb42d 100644 --- a/cmd/podman/compose.go +++ b/cmd/podman/compose.go @@ -202,7 +202,7 @@ func composeProviderExec(args []string, stdout io.Writer, stderr io.Writer, warn logrus.Debugf("Executing compose provider (%s %s) with additional env %s", provider, strings.Join(args, " "), strings.Join(env, " ")) if warn { - fmt.Fprint(os.Stderr, underline(fmt.Sprintf(">>>> Executing external compose provider %q. Please refer to the documentation for details. <<<<\n\n", provider))) + fmt.Fprint(os.Stderr, underline(fmt.Sprintf(">>>> Executing external compose provider %q. Please see podman-compose(1) for how to disable this message. <<<<\n\n", provider))) } if err := cmd.Run(); err != nil { diff --git a/docs/source/markdown/podman-compose.1.md.in b/docs/source/markdown/podman-compose.1.md.in index 05c99135a1..786128745f 100644 --- a/docs/source/markdown/podman-compose.1.md.in +++ b/docs/source/markdown/podman-compose.1.md.in @@ -13,6 +13,8 @@ The default compose providers are `docker-compose` and `podman-compose`. If ins If you want to change the default behavior or have a custom installation path for your provider of choice, please change the `compose_provider` field in `containers.conf(5)`. You may also set the `PODMAN_COMPOSE_PROVIDER` environment variable. +By default, `podman compose` will emit a warning saying that it executes an external command. This warning can be disabled by setting `compose_warning_logs` to false in `containers.conf(5)` or setting the `PODMAN_COMPOSE_WARNING_LOGS` environment variable to false. See the man page for `containers.conf(5)` for more information. + ## OPTIONS To see supported options of the installed compose provider, please run `podman compose --help`.