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

Cannot write metadata to root object #85

Open
drewcassidy opened this issue Aug 30, 2024 · 0 comments
Open

Cannot write metadata to root object #85

drewcassidy opened this issue Aug 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@drewcassidy
Copy link

drewcassidy commented Aug 30, 2024

Describe the Bug

I have the following call. The input items are batched so "VersionFIle" at this point is a single item. it does have the "a" metadata variable

    <JsonPoke Content="{}" Query="$" Value="@(VersionFile)" Properties="a">
      <Output TaskParameter="Content" PropertyName="_JSON"/>
    </JsonPoke>

Expected Behavior

Output json would be

{
  "a": "Value of a"
}

Exception with Stack Trace

0>/Users/drewcassidy/Code/Shabby/KSPBuildTools/KSPCommon.targets(89,5): Error MSB4018 : The "JsonPoke" task failed unexpectedly.
System.InvalidOperationException: The parent is missing.
   at Newtonsoft.Json.Linq.JToken.Replace(JToken value)
   at JsonPoke.Execute() in /_/src/JsonPoke/JsonPoke.cs:line 207
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)

Version Info

JsonPoke 1.2.0

Additional Info

using a different query like "$.thing" does succeed

Back this issue
Back this issue

@drewcassidy drewcassidy added the bug Something isn't working label Aug 30, 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