-
Notifications
You must be signed in to change notification settings - Fork 74
Establish conn to curret-context if no args given #261
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
Conversation
sqlcmd when invoked with no arguments, executes in backward compat mode and ignore current-context info for establishing connection. This commit changes the default behavior to establish connection to the endpoint associated with current-context if valid user details exits in sqlcmd config file. This ensures that users can connect to sql server instance created by sqlcmd if no arguments are specified while invoking sqlcmd.
Move this call to the else statement below (right now we only need this envvars when running in legacy mode) In reply to: 1447954442 In reply to: 1447954442 Refers to: cmd/modern/main.go:49 in 2f1a322. [](commit_id = 2f1a322, deletion_comment = False) |
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.
Changes as discussed earlier
Earlier commit was setting env vars only if endpoint and user info was associated with context. Context however may or may not have user associated with it if end user wants to use trusted authentication. In this commit, we are setting only the available info and inform user of context being used
Incorporated the changes which we discussed earlier. |
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.
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.
sqlcmd when invoked with no arguments, executes in backward compat mode and ignore current-context info for establishing connection. This commit changes the default behavior to establish connection to the endpoint associated with current-context if valid user details exits in sqlcmd config file.
This ensures that users can connect to sql server instance created by sqlcmd if no arguments are specified while invoking sqlcmd.