Skip to content

Commit

Permalink
Fix json path evaluate
Browse files Browse the repository at this point in the history
  • Loading branch information
gitfool committed Aug 14, 2023
1 parent 1f8b467 commit d901af1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Cli/DeployCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ async Task UnprotectResources()
var exportState = await stack.ExportStackAsync();
var json = await RepairStackAsync(exportState.Json.GetRawText());
var importState = StackDeployment.FromJsonString(json);
var jsonPath = JsonPath.Parse("$.deployment.pending_operations[*].resource.urn").Evaluate(importState.Json);
var jsonPath = JsonPath.Parse("$.deployment.pending_operations[*].resource.urn").Evaluate(importState.Json.AsNode());
if (importState.Json.IsEquivalentTo(exportState.Json))
{
Logger.LogWarning("Repaired stack resources ignored (equivalent)");
Expand All @@ -158,7 +158,7 @@ async Task UnprotectResources()
Logger.LogWarning("Repaired stack resources ignored (pending resources):");
foreach (var match in jsonPath.Matches)
{
Logger.LogWarning(match.Value.ToString());
Logger.LogWarning(match.Value!.ToString());
}
}
else
Expand Down

0 comments on commit d901af1

Please sign in to comment.