浏览代码

Fix -t flag for compose up command

Signed-off-by: Debdut Chakraborty <[email protected]>
Debdut Chakraborty 4 年之前
父节点
当前提交
55a214a45e
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      cmd/compose/up.go

+ 1 - 3
cmd/compose/up.go

@@ -98,10 +98,8 @@ func upCommand(p *projectOptions, backend api.Service) *cobra.Command {
 	upCmd := &cobra.Command{
 		Use:   "up [SERVICE...]",
 		Short: "Create and start containers",
-		PreRun: func(cmd *cobra.Command, args []string) {
+		PreRunE: AdaptCmd(func(ctx context.Context, cmd *cobra.Command, args []string) error {
 			create.timeChanged = cmd.Flags().Changed("timeout")
-		},
-		PreRunE: Adapt(func(ctx context.Context, args []string) error {
 			if up.exitCodeFrom != "" {
 				up.cascadeStop = true
 			}