From ee330682d9dd93d60d9c5f16f4ede5503d019c68 Mon Sep 17 00:00:00 2001 From: Tom Wiesing Date: Tue, 13 Sep 2022 17:06:15 +0200 Subject: [PATCH] program: Skip warning inside docker --- program.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/program.go b/program.go index 1fd2f7f..c41df0c 100644 --- a/program.go +++ b/program.go @@ -39,12 +39,10 @@ func NewProgram() Program { return errUserIsNotRoot } - // warn when not using the distillery excutable - if context.Description.Requirements.NeedsDistillery { - dis := context.Environment - if !dis.UsingDistilleryExecutable() { - context.EPrintf(warnNoDeployWdcli, core.Executable, dis.ExecutablePath()) - } + // when not running inside docker and we need a distillery + // then we should warn if we are not using the distillery executable. + if dis := context.Environment; !context.Args.Flags.InternalInDocker && context.Description.Requirements.NeedsDistillery && !dis.UsingDistilleryExecutable() { + context.EPrintf(warnNoDeployWdcli, core.Executable, dis.ExecutablePath()) } return nil