Open
Description
Describe the Bug
YamlPeek fails when the yaml root is a list
Steps to Reproduce
Feed a list like:
- name: Star Trek
stuff: yes
- name: Star Wars
stuff: no
Expected Behavior
parses correctly
Exception with Stack Trace
"MyTarget.targets" (DoStuff target) (1) ->
(EnsureOutputFiles target) ->
MyTarget.targets(31,5): error MSB4018: The "YamlPeek" task failed unexpectedly.
MyTarget.targets(31,5): error MSB4018: Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Current JsonReader item is not an object: StartArray. Path '', line 1, position 1.
MyTarget.targets(31,5): error MSB4018: at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
MyTarget.targets(31,5): error MSB4018: at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
MyTarget.targets(31,5): error MSB4018: at YamlPeek.Execute() in /_/src/YamlPeek/YamlPeek.cs:line 67
MyTarget.targets(31,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Execute()
MyTarget.targets(31,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
Version Info
1.0.0
Activity