You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wizard overwrites the diagram with the inventory JSON when -OutputPath does not end in .drawio #9
If the user passes an output path without a .drawio suffix (for example -OutputPath .\office.xml or -OutputPath .\office), the regex does not match and $inventoryPath equals $OutputPath. Line 514 then runs Out-File -FilePath $inventoryPath -Force, which replaces the draw.io XML written at line 486 with the inventory JSON. The summary at lines 528 to 532 still tells the user two files were produced.
The -OutputPath parameter (line 31) has no validation and the README advertises it as a free-form path.
Why it matters
The scan result is silently destroyed after a scan that can take minutes on -ScanDepth Full. The user sees a success banner and only finds out when draw.io refuses the file.
Done when
The inventory path is built with [System.IO.Path]::ChangeExtension or an explicit check, so it never equals $OutputPath.
Either -OutputPath is validated to end in .drawio, or a non-.drawio path is accepted and the inventory is still written to a distinct sibling file.
The path-derivation logic is moved above the if ($MyInvocation.InvocationName -eq '.') { return } guard (line 106) so the existing dot-sourcing pattern in tests/NetDiagram.Tests.ps1:586 can cover it with a Pester case for a .xml and an extensionless path.
Activity
docs: remove private review numbering from test names (#32)