Skip to content

Commit

Permalink
fix exit errors with no line break
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Gumieri committed Oct 29, 2019
1 parent 593f4d3 commit 10ef2f0
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
6 changes: 3 additions & 3 deletions cmd/services_copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func servicesCopyRun(cmd *cobra.Command, services []string) {
t.Must(err)

if len(targetClustersDescription.Clusters) == 0 {
t.Exitf("Target Cluster informed not found")
t.Exitln("Target Cluster informed not found")
}

targetC := targetClustersDescription.Clusters[0]
Expand All @@ -31,7 +31,7 @@ func servicesCopyRun(cmd *cobra.Command, services []string) {
t.Must(err)

if len(clustersDescription.Clusters) == 0 {
t.Exitf("Source Cluster informed not found")
t.Exitln("Source Cluster informed not found")
}

c := clustersDescription.Clusters[0]
Expand All @@ -42,7 +42,7 @@ func servicesCopyRun(cmd *cobra.Command, services []string) {
})

if len(servicesDescription.Services) < len(services) {
t.Exitf("One or more services informed was not found")
t.Exitln("One or more services informed was not found")
}

for _, s := range servicesDescription.Services {
Expand Down
6 changes: 3 additions & 3 deletions cmd/services_deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func servicesDeployRun(cmd *cobra.Command, args []string) {
t.Must(err)

if len(clustersDescription.Clusters) == 0 {
t.Exitf("Cluster informed not found")
t.Exitln("Cluster informed not found")
}

c := clustersDescription.Clusters[0]
Expand All @@ -38,7 +38,7 @@ func servicesDeployRun(cmd *cobra.Command, args []string) {
t.Must(err)

if len(servicesDescription.Failures) != 0 {
t.Exitf("A service informed aws not found") // TODO: handle the `Arn` and `Reason` to a more accurate error message
t.Exitln("A service informed aws not found") // TODO: handle the `Arn` and `Reason` to a more accurate error message
}

if tag == "" && image == "" {
Expand Down Expand Up @@ -77,7 +77,7 @@ func servicesDeployRun(cmd *cobra.Command, args []string) {
}

if cdToUpdate == nil {
t.Exitf("No container on the Task Family %s", aws.StringValue(td.Family))
t.Exitf("No container on the Task Family %s\n", aws.StringValue(td.Family))
}

if tag != "" {
Expand Down
2 changes: 1 addition & 1 deletion cmd/services_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func servicesListRun(cmd *cobra.Command, services []string) {
t.Must(err)

if len(clustersDescription.Clusters) == 0 {
t.Exitf("Source Cluster informed not found")
t.Exitln("Source Cluster informed not found")
}

c := clustersDescription.Clusters[0]
Expand Down
2 changes: 1 addition & 1 deletion cmd/task_definitions_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func taskDefinitionsRunRun(cmd *cobra.Command, args []string) {
t.Must(err)

if len(taskResult.Tasks) == 0 {
t.Exitf("task failed to run")
t.Exitln("task failed to run")
}

if !follow {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/google/go-github v17.0.0+incompatible
github.com/google/go-querystring v1.0.0 // indirect
github.com/gumieri/open-in-editor v0.0.0-20180920123653-4f3f3f35875d
github.com/gumieri/typist v1.1.0
github.com/gumieri/typist v1.2.1
github.com/hashicorp/go-version v1.2.0
github.com/hokaccha/go-prettyjson v0.0.0-20180920040306-f579f869bbfe // indirect
github.com/magiconair/properties v1.8.1 // indirect
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ github.com/gumieri/typist v1.0.4 h1:oQnuNKQ+RBoDcoMvp0Da8z+2Qsh4R3y4kydeiEhL3Bs=
github.com/gumieri/typist v1.0.4/go.mod h1:WcfG796Sv8a7K6ZbIxDIpHOll5cLUzGWx0l/Mlcg9cQ=
github.com/gumieri/typist v1.1.0 h1:vrntViiV9uKYu0UxMFTJ2gEMXKe0gcDnBclv+/lLQho=
github.com/gumieri/typist v1.1.0/go.mod h1:WcfG796Sv8a7K6ZbIxDIpHOll5cLUzGWx0l/Mlcg9cQ=
github.com/gumieri/typist v1.2.0 h1:tv+yQwr6ziIxRmOTiAaJNGWUrX1JoYsXNoNSH3JaGY4=
github.com/gumieri/typist v1.2.0/go.mod h1:WcfG796Sv8a7K6ZbIxDIpHOll5cLUzGWx0l/Mlcg9cQ=
github.com/gumieri/typist v1.2.1 h1:FwC/vWAuPCMWIgNleqTZ/bpyGLFrzEPKNnEG3iAYbcM=
github.com/gumieri/typist v1.2.1/go.mod h1:WcfG796Sv8a7K6ZbIxDIpHOll5cLUzGWx0l/Mlcg9cQ=
github.com/hashicorp/go-version v1.2.0 h1:3vNe/fWF5CBgRIguda1meWhsZHy3m8gCJ5wx+dIzX/E=
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
Expand Down

0 comments on commit 10ef2f0

Please sign in to comment.