From f515cd5c55c4e10e3d2f2b322625c027e5bd760e Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Tue, 17 Oct 2023 11:50:38 -0700 Subject: [PATCH] Reorder fields when writing bootstrap params Signed-off-by: Maksym Pavlenko --- runtime/v2/shim.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runtime/v2/shim.go b/runtime/v2/shim.go index 72635144c..76ce6d061 100644 --- a/runtime/v2/shim.go +++ b/runtime/v2/shim.go @@ -211,12 +211,13 @@ func writeBootstrapParams(path string, params client.BootstrapParams) error { if err != nil { return err } - f, err := atomicfile.New(path, 0o666) + + data, err := json.Marshal(¶ms) if err != nil { return err } - data, err := json.Marshal(¶ms) + f, err := atomicfile.New(path, 0o666) if err != nil { return err }