Skip to content

Commit c376cc4

Browse files
authored
Fix verbose flag for cd commands (#1011)
1 parent 577f7eb commit c376cc4

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/cmd/cli/command/cd.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ var cdDestroyCmd = &cobra.Command{
3838
return err
3939
}
4040

41-
return cli.BootstrapCommand(cmd.Context(), projectName, client, provider, "destroy")
41+
return cli.BootstrapCommand(cmd.Context(), projectName, verbose, provider, "destroy")
4242
},
4343
}
4444

@@ -64,7 +64,7 @@ var cdDownCmd = &cobra.Command{
6464
return err
6565
}
6666

67-
return cli.BootstrapCommand(cmd.Context(), projectName, client, provider, "down")
67+
return cli.BootstrapCommand(cmd.Context(), projectName, verbose, provider, "down")
6868
},
6969
}
7070

@@ -90,7 +90,7 @@ var cdRefreshCmd = &cobra.Command{
9090
return err
9191
}
9292

93-
return cli.BootstrapCommand(cmd.Context(), projectName, client, provider, "refresh")
93+
return cli.BootstrapCommand(cmd.Context(), projectName, verbose, provider, "refresh")
9494
},
9595
}
9696

@@ -116,7 +116,7 @@ var cdCancelCmd = &cobra.Command{
116116
return err
117117
}
118118

119-
return cli.BootstrapCommand(cmd.Context(), projectName, client, provider, "cancel")
119+
return cli.BootstrapCommand(cmd.Context(), projectName, verbose, provider, "cancel")
120120
},
121121
}
122122

@@ -157,7 +157,7 @@ var cdListCmd = &cobra.Command{
157157
}
158158

159159
// FIXME: this needs auth because it spawns the CD task
160-
return cli.BootstrapCommand(cmd.Context(), "", client, provider, "list")
160+
return cli.BootstrapCommand(cmd.Context(), "", verbose, provider, "list")
161161
}
162162
return cli.BootstrapLocalList(cmd.Context(), provider)
163163
},

src/pkg/cli/bootstrap.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/DefangLabs/defang/src/pkg/term"
1212
)
1313

14-
func BootstrapCommand(ctx context.Context, projectName string, c client.FabricClient, p client.Provider, cmd string) error {
14+
func BootstrapCommand(ctx context.Context, projectName string, verbose bool, p client.Provider, cmd string) error {
1515
term.Infof("Running CD command %q in project %q", cmd, projectName)
1616
if DoDryRun {
1717
return ErrDryRun
@@ -23,7 +23,7 @@ func BootstrapCommand(ctx context.Context, projectName string, c client.FabricCl
2323
return err
2424
}
2525

26-
return tail(ctx, p, projectName, TailOptions{Etag: etag, Since: since, LogType: logs.LogTypeBuild})
26+
return tail(ctx, p, projectName, TailOptions{Etag: etag, Since: since, LogType: logs.LogTypeBuild, Verbose: verbose})
2727
}
2828

2929
func SplitProjectStack(name string) (projectName string, stackName string) {

0 commit comments

Comments
 (0)