Commit d0c3163
Uninstall-DbaSqlWatch - Skip DACPAC unregister when no registration exists
Fixes test failures where Install-DbaSqlWatch's post-deployment script
times out, leaving schema objects deployed but no DAC registration in
msdb. The unconditional Unregister() call then threw 'DacInstance with
the specified instance_id does not exist'.
Now checks GetDatabases() before calling Unregister() so cleanup is
safe regardless of whether the DACPAC registration completed.
(do *SqlWatch*)
Co-authored-by: Andreas Jordan <andreasjordan@users.noreply.github.com>1 parent b32aa4d commit d0c3163
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
216 | 221 | | |
217 | 222 | | |
218 | 223 | | |
| |||
0 commit comments