Add some warings on create if things don't look right

This commit is contained in:
Joel Elkins 2022-07-20 21:42:57 -05:00
parent 790c2a89ce
commit a09c2a7225

View File

@ -72,6 +72,12 @@ func (c *Container) CreateCommands() []command.Command {
if len(c.createCommands) == 0 {
c.initCommands()
}
if c.Arguments == "" {
fmt.Fprintf(os.Stderr, "Warning: Container %s does not have arguments defined! That's unusual", c.Name)
}
if c.Image == "" {
fmt.Fprintf(os.Stderr, "Error: Container %s does not have an image defined!", c.Name)
}
return c.createCommands
}