dataplat/dbachecks

Export-DbcConfig - does not work at all

Closed this issue · 0 comments

Bug Report

Default or provided file is never created.

General Troubleshooting steps

  • Verified running the latest release of dbachecks?

Running 3.0.0 preview

  • Verified errors are not related to permissions?
  • Can duplicate in new/clean PowerShell session (clean = powershell -NoProfile)?

Version Information

N/A

Steps to Reproduce

<--
PLEASE include as much information as possible if this is a bug report.
The more you include the faster we can identify the problem and get it fixed
-->

  • Attach any screenshots (if possible/allowed)
  • Attach output from PowerShell console (if possible/allowed)

image

image

Export-DbcConfig -Path c:\tmp\dbchk.json
[09:43:40][Export-DbcConfig] Uh-Oh - File c:\tmp\dbchk.json exists - use the Force parameter to overwrite (even if your name is not Luke!)

#23 0d 0:00:00.005ls c:\tmp\dbchk.json
Get-ChildItem: Cannot find path 'C:\tmp\dbchk.json' because it does not exist.

Description of Bug

if (Test-Path -Path $file) {

Does not look like an active test on the command exist anymore, or is never being run to catch this issue.