- process.Init#io could be nil
- Make sure CreateTaskRequest#Options is not empty before unmarshaling

Signed-off-by: Kazuyoshi Kato <katokazu@amazon.com>
This commit is contained in:
Kazuyoshi Kato
2020-11-11 21:37:39 -08:00
parent f201b78b90
commit b520428b5a
2 changed files with 6 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ func NewContainer(ctx context.Context, platform stdio.Platform, r *task.CreateTa
}
var opts options.Options
if r.Options != nil {
if r.Options != nil && r.Options.GetTypeUrl() != "" {
v, err := typeurl.UnmarshalAny(r.Options)
if err != nil {
return nil, err