Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse fails on lists #49

Open
wldevries opened this issue Nov 12, 2024 · 0 comments
Open

Parse fails on lists #49

wldevries opened this issue Nov 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@wldevries
Copy link

wldevries commented Nov 12, 2024

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

Additional Info

Back this issue
Back this issue

@wldevries wldevries added the bug Something isn't working label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant