Skip to content

Commit 26b8709

Browse files
Merge pull request #24 from fabi200123/add-default-extraspecs
Add initialization for ExtraSpecs as an empty JSON object
2 parents bbe4930 + 62b33c5 commit 26b8709

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: execution/execution.go

+4
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ func GetEnvironment() (Environment, error) {
7777
if err := json.Unmarshal(data.Bytes(), &bootstrapParams); err != nil {
7878
return Environment{}, fmt.Errorf("failed to decode instance params: %w", err)
7979
}
80+
if bootstrapParams.ExtraSpecs == nil {
81+
// Initialize ExtraSpecs as an empty JSON object
82+
bootstrapParams.ExtraSpecs = json.RawMessage([]byte("{}"))
83+
}
8084
env.BootstrapParams = bootstrapParams
8185
}
8286

0 commit comments

Comments
 (0)