Skip to content

Commit

Permalink
Initialize default ExtraSpecs as an empty JSON object
Browse files Browse the repository at this point in the history
  • Loading branch information
fabi200123 committed Apr 11, 2024
1 parent bbe4930 commit 62b33c5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions execution/execution.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ func GetEnvironment() (Environment, error) {
if err := json.Unmarshal(data.Bytes(), &bootstrapParams); err != nil {
return Environment{}, fmt.Errorf("failed to decode instance params: %w", err)
}
if bootstrapParams.ExtraSpecs == nil {
// Initialize ExtraSpecs as an empty JSON object
bootstrapParams.ExtraSpecs = json.RawMessage([]byte("{}"))
}
env.BootstrapParams = bootstrapParams
}

Expand Down

0 comments on commit 62b33c5

Please sign in to comment.