fix: ensure the profile is a proper json file
This commit is contained in:
@@ -1080,7 +1080,11 @@ func CommandProfilesList(format string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
output := []NodeProfile{}
|
output := []NodeProfile{}
|
||||||
for _, data := range properties {
|
for property, data := range properties {
|
||||||
|
if !strings.HasSuffix(property, ".json") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
var profile NodeProfile
|
var profile NodeProfile
|
||||||
err := json.Unmarshal([]byte(data), &profile)
|
err := json.Unmarshal([]byte(data), &profile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user