Skip to content
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

Add product name and description to output #452

Merged

Conversation

rwestMSFT
Copy link
Contributor

@rwestMSFT rwestMSFT commented Aug 16, 2023

Add product name to --version and -? output, to emulate the output of sqlcmd ODBC.

Fixes #392.

The ODBC tool output looks like this:

Microsoft (R) SQL Server Command Line Tool
Version 16.0.4025.1 NT
Copyright (C) 2022 Microsoft Corporation. All rights reserved.

Adding this PR would change the output from this (-?):

Version 1.3.0

Flags: [...]

To this:

sqlcmd: Install/Create/Query SQL Server, Azure SQL, and Tools
Version 1.3.0

Flags: [...]

And this (--version):

1.3.0
Legal docs and information: aka.ms/SqlcmdLegal
Third party notices: aka.ms/SqlcmdNotices

To this:

sqlcmd: Install/Create/Query SQL Server, Azure SQL, and Tools
1.3.0
Legal docs and information: aka.ms/SqlcmdLegal
Third party notices: aka.ms/SqlcmdNotices

Added product name to --version and -? to somewhat emulate the output of sqlcmd ODBC
@shueybubbles
Copy link
Collaborator

thx for opening a PR!

I don't think this particular output is relevant for cmd/sqlcmd, since legacy mode only supports queries. None of the flags -? prints are about install or create.
ODBC is printing the product name and we don't really have a good product name other than "sqlcmd" yet. @dlevy-msft it'd be good to talk to the marketing/branding folks to see what name we should use.

@rwestMSFT
Copy link
Contributor Author

@shueybubbles This is less about relevancy, and more about adding the name of the product when checking which version is installed. As discussed in other conversations, sqlcmd "-?" is a universal command that will run across OSes and versions of sqlcmd, and I think it should include a product name (whatever that is) before the version number, in this and --version info.

cmd/sqlcmd/sqlcmd.go Outdated Show resolved Hide resolved
@shueybubbles shueybubbles merged commit 2a22218 into microsoft:main Oct 31, 2023
5 checks passed
@rwestMSFT rwestMSFT deleted the rw-0816-add-product-name-to-output branch October 31, 2023 16:32
@Alyst85
Copy link

Alyst85 commented Jan 4, 2024

✌️👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update sqlcmd -? response
5 participants