-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SqlAzureDacpacDeployment: Bug fix for firewall Auto-Detect #6613
Conversation
Write-Verbose "Reaching SqlServer to check connection by running Invoke-SqlCmd" | ||
Write-Verbose "Invoke-Sqlcmd -ServerInstance $serverName -Username $formattedSqlUsername -Password ****** -Query `"select getdate()`" -ErrorVariable errors | Out-String" | ||
|
||
$output = Invoke-Sqlcmd -ServerInstance $serverName -Username $formattedSqlUsername -Password $sqlPassword -Query "select getdate()" -ErrorVariable errors | Out-String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation
@@ -250,3 +265,17 @@ function ConvertParamToSqlSupported | |||
return $param | |||
} | |||
|
|||
function Test-CommandExists |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, you can write this as single condition of if block as if (Get-Command $commandName -ErrorAction SilentlyContinue) {}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine. Change indentation before merging.
) | ||
|
||
try { | ||
Get-Command -Name $commandName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add -ErrorAction Stop explicitly as well.
* SqlAzureDacpacDeployment: Bug fix for firewall Auto-Detect * Addressing review comments * Added connection timeout for Invoke-Sqlcmd * Added troubleshooting section in README * Updated README
…6685) * SqlAzureDacpacDeployment: Bug fix for firewall Auto-Detect (#6613) * SqlAzureDacpacDeployment: Bug fix for firewall Auto-Detect * Addressing review comments * Added connection timeout for Invoke-Sqlcmd * Added troubleshooting section in README * Updated README * Updated troubleshooting link
No description provided.