Skip to content

Commit 55b9f0f

Browse files
author
Matthew Fisher
committed
Merge pull request #4114 from Joshua-Anderson/apps-destroy-fix
fix(client-go): make output from apps:destroy match python client
2 parents 11cdd5c + c1cf84b commit 55b9f0f

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

client-go/cmd/apps.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"net/url"
66
"os"
77
"strings"
8+
"time"
89

910
"github.com/deis/deis/pkg/prettyprint"
1011

@@ -195,7 +196,7 @@ func AppDestroy(appID, confirm string) error {
195196
! This command will destroy the application: %s
196197
! To proceed, type "%s" or re-run this command with --confirm=%s
197198
198-
>`, appID, appID, appID)
199+
> `, appID, appID, appID)
199200

200201
fmt.Scanln(&confirm)
201202
}
@@ -204,12 +205,15 @@ func AppDestroy(appID, confirm string) error {
204205
return fmt.Errorf("App %s does not match confirm %s, aborting.", appID, confirm)
205206
}
206207

207-
fmt.Printf("Destroying %s...", appID)
208+
startTime := time.Now()
209+
fmt.Printf("Destroying %s...\n", appID)
208210

209211
if err = apps.Delete(c, appID); err != nil {
210212
return err
211213
}
212214

215+
fmt.Printf("done in %ds\n", int(time.Since(startTime).Seconds()))
216+
213217
if gitSession {
214218
return c.DeleteRemote(appID)
215219
}

client-go/controller/client/git.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ func (c Client) CreateRemote(remote, appID string) error {
3737
func (c Client) DeleteRemote(appID string) error {
3838
name, err := remoteNameFromAppID(appID)
3939

40-
fmt.Printf("'%s'\n", name)
41-
4240
if err != nil {
4341
return err
4442
}

0 commit comments

Comments
 (0)