mirror of
https://github.com/docker/compose.git
synced 2026-08-31 23:03:55 +00:00
Compose as a cli plugin
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com> Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
85af8cdaaa
commit
1dc97e8c4b
11 changed files with 494 additions and 97 deletions
|
|
@ -123,6 +123,14 @@ func Command(contextType string, backend compose.Service) *cobra.Command {
|
|||
return fmt.Errorf("unknown docker command: %q", "compose "+args[0])
|
||||
},
|
||||
PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
|
||||
parent := cmd.Root()
|
||||
parentPrerun := parent.PersistentPreRunE
|
||||
if parentPrerun != nil {
|
||||
err := parentPrerun(cmd, args)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if noAnsi {
|
||||
if ansi != "auto" {
|
||||
return errors.New(`cannot specify DEPRECATED "--no-ansi" and "--ansi". Please use only "--ansi"`)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue