Skip to content

Commit

Permalink
Fix command example to print the invoking script.
Browse files Browse the repository at this point in the history
  • Loading branch information
stevewgr committed May 22, 2024
1 parent 43d915a commit 4977d93
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion utils.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ function ValidateServerNameInput {
$sql_instances = @($sql_instances | Where-Object { $_ -ne "MSSQLSERVER" })
if ($sql_instances) {
MessageError "Available sql named instances: [$($sql_instances -join ', ')]"
MessageError "Example: .\odbcad.ps1 -server_name .\$($sql_instances[-1])"
$invoker_script_name = ($MyInvocation.PSCommandPath -split "\\")[-1]
MessageError "Example: .\$invoker_script_name -server_name "".\$($sql_instances[-1])"""
exit 1
}
return $false
}
Expand Down

0 comments on commit 4977d93

Please sign in to comment.