Skip to content

Commit 83d80f7

Browse files
committed
deprecate delete command
1 parent 85c7f96 commit 83d80f7

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

src/cmd/cli/command/commands.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,7 @@ var deleteCmd = &cobra.Command{
842842
Args: cobra.MinimumNArgs(1),
843843
Aliases: []string{"del", "rm", "remove"},
844844
Short: "Delete a service from the cluster",
845+
Deprecated: "use 'compose stop' instead",
845846
RunE: func(cmd *cobra.Command, names []string) error {
846847
var tail, _ = cmd.Flags().GetBool("tail")
847848

@@ -932,7 +933,7 @@ var logoutCmd = &cobra.Command{
932933
var bootstrapCmd = &cobra.Command{
933934
Use: "cd",
934935
Aliases: []string{"bootstrap"},
935-
Short: "Manually run a command with the CD task",
936+
Short: "Manually run a command with the CD task (for BYOC only)",
936937
}
937938

938939
var bootstrapDestroyCmd = &cobra.Command{

src/pkg/cli/client/byoc/aws/byoc.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,12 @@ func (b *ByocAws) environment() map[string]string {
372372
func (b *ByocAws) runCdCommand(ctx context.Context, cmd ...string) (ecs.TaskArn, error) {
373373
env := b.environment()
374374
if term.DoDebug {
375-
debugEnv := " -"
375+
debugEnv := fmt.Sprintf("AWS_REGION=%q", b.driver.Region)
376+
if awsProfile := os.Getenv("AWS_PROFILE"); awsProfile != "" {
377+
debugEnv += fmt.Sprintf(" AWS_PROFILE=%q", awsProfile)
378+
}
376379
for k, v := range env {
377-
debugEnv += " " + k + "=" + v
380+
debugEnv += fmt.Sprintf(" %s=%q", k, v)
378381
}
379382
term.Debug(debugEnv, "npm run dev", strings.Join(cmd, " "))
380383
}

src/pkg/cli/composeDown.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,10 @@ func ComposeDown(ctx context.Context, client client.Client) (types.ETag, error)
1414
return "", err
1515
}
1616
term.Debug(" - Destroying project", projectName)
17+
18+
if DoDryRun {
19+
return "", ErrDryRun
20+
}
21+
1722
return client.Destroy(ctx)
1823
}

0 commit comments

Comments
 (0)