Closed apoorvdeshmukh closed 1 year ago
legacyCmd.Execute(version)
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 = 2f1a322c68cd1c6f7c0a6910b4635bca4134ad7b, deletion_comment = False)
Changes as discussed earlier
Incorporated the changes which we discussed earlier. Now we are setting only those env variables for which info is available in context such as endpoint and skipping others such as user details if not available (in case context is to be used for trusted authentication)
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.