Skip to content

Commit

Permalink
fix cases of no change at task definition edition
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Gumieri committed Oct 26, 2019
1 parent d867e36 commit 5aefe29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/task_definitions_edit.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
"os"
"strconv"
"strings"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/service/ecs"
Expand Down Expand Up @@ -56,7 +57,8 @@ func taskDefinitionsEditRun(cmd *cobra.Command, args []string) {
file, err := editor.LastFile()
typist.Must(err)

if string(file.Content) == (string(jsonTdDescription) + "\n") {
if strings.Trim(string(file.Content), "\n") == strings.Trim(string(jsonTdDescription), "\n") {
typist.Println(errors.New("nothing changed"))
return
}

Expand Down

0 comments on commit 5aefe29

Please sign in to comment.