Skip to content

Commit ad68bda

Browse files
committed
Bug fix: catch errors from UserDataBuilder.AddFile
1 parent aac7a13 commit ad68bda

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ecs-cli/modules/cli/cluster/cluster_app.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,10 @@ func cliFlagsToCfnStackParams(context *cli.Context, cluster, launchType string)
511511
// handle extra user data, which is a string slice flag
512512
if userDataFiles := context.StringSlice(flags.UserDataFlag); len(userDataFiles) > 0 {
513513
for _, file := range userDataFiles {
514-
builder.AddFile(file)
514+
err := builder.AddFile(file)
515+
if err != nil {
516+
return nil, err
517+
}
515518
}
516519
}
517520
userData, err := builder.Build()

0 commit comments

Comments
 (0)