From 0e5db7db5ca5d7995073260e51201278e72169bc Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Thu, 20 Nov 2025 04:56:55 -0500 Subject: [PATCH] fix: ensure the profile is a proper json file --- plugins/scheduler-k3s/subcommands.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/scheduler-k3s/subcommands.go b/plugins/scheduler-k3s/subcommands.go index 9d72c39dd..24fd074d6 100644 --- a/plugins/scheduler-k3s/subcommands.go +++ b/plugins/scheduler-k3s/subcommands.go @@ -1080,7 +1080,11 @@ func CommandProfilesList(format string) error { } output := []NodeProfile{} - for _, data := range properties { + for property, data := range properties { + if !strings.HasSuffix(property, ".json") { + continue + } + var profile NodeProfile err := json.Unmarshal([]byte(data), &profile) if err != nil {