dataplat / dbops

⚙ dbops - Powershell module that provides continuous database deployments on any scale
MIT License
155 stars 39 forks source link

DbOps displays SqlException error message twice #135

Open michaelsync opened 2 years ago

michaelsync commented 2 years ago

I have the following script.

Install-DBOScript -ScriptPath ./sql-scripts/*.sql -SqlInstance localhost -Database DbUpTest -Credential $sqlcredential -ErrorAction Stop

I noticed that it's executing the file two files according to the error log as below. May I know why?

image

nvarscar commented 2 years ago

The error log displays error output from two sources here: first comes from the DbUp framework, second comes from the error that it throughs, which is then processed by DBOps and regurgitated again. The script is only run once, but the error is shown twice. I will look into it at some point, though right now I'm not sure what's the best solution would be. Perhaps I'm not going to log SqlExceptions? I'll see how that works first.