program: Skip warning inside docker

This commit is contained in:
Tom Wiesing 2022-09-13 17:06:15 +02:00
parent f674e50e10
commit ee330682d9
No known key found for this signature in database

View file

@ -39,13 +39,11 @@ func NewProgram() Program {
return errUserIsNotRoot return errUserIsNotRoot
} }
// warn when not using the distillery excutable // when not running inside docker and we need a distillery
if context.Description.Requirements.NeedsDistillery { // then we should warn if we are not using the distillery executable.
dis := context.Environment if dis := context.Environment; !context.Args.Flags.InternalInDocker && context.Description.Requirements.NeedsDistillery && !dis.UsingDistilleryExecutable() {
if !dis.UsingDistilleryExecutable() {
context.EPrintf(warnNoDeployWdcli, core.Executable, dis.ExecutablePath()) context.EPrintf(warnNoDeployWdcli, core.Executable, dis.ExecutablePath())
} }
}
return nil return nil
}, },