(cmd *cobra.Command, args []string)
| 46 | } |
| 47 | |
| 48 | func configAction(cmd *cobra.Command, args []string) error { |
| 49 | globalOptions, err := helpers.ProcessRootCmdFlags(cmd) |
| 50 | if err != nil { |
| 51 | return err |
| 52 | } |
| 53 | if len(args) != 0 { |
| 54 | // TODO: support specifying service names as args |
| 55 | return fmt.Errorf("arguments %v not supported", args) |
| 56 | } |
| 57 | quiet, err := cmd.Flags().GetBool("quiet") |
| 58 | if err != nil { |
| 59 | return err |
| 60 | } |
| 61 | services, err := cmd.Flags().GetBool("services") |
| 62 | if err != nil { |
| 63 | return err |
| 64 | } |
| 65 | volumes, err := cmd.Flags().GetBool("volumes") |
| 66 | if err != nil { |
| 67 | return err |
| 68 | } |
| 69 | hash, err := cmd.Flags().GetString("hash") |
| 70 | if err != nil { |
| 71 | return err |
| 72 | } |
| 73 | |
| 74 | client, ctx, cancel, err := clientutil.NewClient(cmd.Context(), globalOptions.Namespace, globalOptions.Address) |
| 75 | if err != nil { |
| 76 | return err |
| 77 | } |
| 78 | defer cancel() |
| 79 | options, err := getComposeOptions(cmd, globalOptions.DebugFull, globalOptions.Experimental) |
| 80 | if err != nil { |
| 81 | return err |
| 82 | } |
| 83 | c, err := compose.New(client, globalOptions, options, cmd.OutOrStdout(), cmd.ErrOrStderr()) |
| 84 | if err != nil { |
| 85 | return err |
| 86 | } |
| 87 | |
| 88 | if quiet { |
| 89 | return nil |
| 90 | } |
| 91 | co := composer.ConfigOptions{ |
| 92 | Services: services, |
| 93 | Volumes: volumes, |
| 94 | Hash: hash, |
| 95 | } |
| 96 | return c.Config(ctx, cmd.OutOrStdout(), co) |
| 97 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…