cockroach-sql: allow invocation via a sql sub-command#80833
Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom May 3, 2022
Merged
cockroach-sql: allow invocation via a sql sub-command#80833craig[bot] merged 1 commit intocockroachdb:masterfrom
sql sub-command#80833craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
Member
otan
reviewed
May 1, 2022
pkg/cmd/cockroach-sql/main.go
Outdated
Contributor
There was a problem hiding this comment.
is there a way we can add a regression test for this behaviour (a la .tcl test or otherwise?)
Contributor
Author
There was a problem hiding this comment.
Yeah that would be nice. But it's not easy in this PR because we need new CI rules. Will track in #80921.
ianjevans
approved these changes
May 2, 2022
We want to simplify tutorials, docs etc by allowing 'cockroach-sql' to be symlinked to 'cockroach' and ensure that the resulting symlink still works when invoked as 'cockroach sql' (with a 'sql' sub-command). Release note (cli change): The standalone SQL shell executable `cockroach-sql` can now be installed (renamed/symlinked) as `cockroach`, and invoked via `cockroach sql`. For example, the following commands are all equivalent: ``` $ cockroach-sql -f foo.sql $ cockroach-sql sql -f foo.sql after running `ln -s cockroach-sql cockroach`: $ cockroach sql -f foo.sql ```
Contributor
Author
|
TFYR bors r=ianjevans |
Contributor
|
Build succeeded: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by @ianjevans
Fixes #79850.
We want to simplify tutorials, docs etc by allowing 'cockroach-sql' to
be symlinked to 'cockroach' and ensure that the resulting symlink
still works when invoked as 'cockroach sql' (with a 'sql'
sub-command).
Release note (cli change): The standalone SQL shell executable
cockroach-sqlcan now be installed (renamed/symlinked) ascockroach, and invoked viacockroach sql. For example, thefollowing commands are all equivalent: