-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_debug-bd.ps1
More file actions
26 lines (20 loc) · 914 Bytes
/
Copy path_debug-bd.ps1
File metadata and controls
26 lines (20 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Debug: test if Json switch gets set via hashtable splatting
Set-Content .beads/issues.jsonl ''
. "$PSScriptRoot\beads-helpers.ps1"
Write-Host '=== Create issue ==='
bd create 'Debug issue' -Priority 1
Write-Host '=== Direct script call with -Json ==='
$direct = .\scripts\beads-query.ps1 list -Json
Write-Host "direct type: $($direct.GetType().Name)"
Write-Host "direct: $direct"
Write-Host '=== bd list --json captured ==='
$via_bd = bd list --json
Write-Host "via_bd type: $(if ($via_bd -eq $null) { 'NULL' } else { $via_bd.GetType().Name })"
Write-Host "via_bd: $via_bd"
Write-Host '=== Hashtable splatting test directly ==='
$params = @{ Json = $true }
$result = .\scripts\beads-query.ps1 list @params
Write-Host "splat result type: $(if ($result -eq $null) { 'NULL' } else { $result.GetType().Name })"
Write-Host "splat result: $result"
Write-Host '=== Cleanup ==='
Set-Content .beads/issues.jsonl ''