summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2022-03-10 13:10:35 +0100
committerGitHub <noreply@github.com>2022-03-10 13:10:35 +0100
commit80abc0659f07445536d92c59fae58dfb1f0ecae8 (patch)
treea78b470f3c6a06fd21b4e62292dde9fe7defc071
parent2d1c767b22fee1676a9f2666ab10783f62f0613e (diff)
parenta62b9623f4c30ed117f0261ae6b5ef318e70cf7f (diff)
Merge pull request #21624 from vespa-engine/mpolden/cli-tweaks
Minor CLI tweaks
-rw-r--r--client/go/Makefile2
-rw-r--r--client/go/cmd/api_key.go8
-rw-r--r--client/go/cmd/cert.go8
-rw-r--r--client/go/cmd/log_test.go2
-rw-r--r--client/go/cmd/root.go4
5 files changed, 12 insertions, 12 deletions
diff --git a/client/go/Makefile b/client/go/Makefile
index ce182b5d653..3da7b504f6c 100644
--- a/client/go/Makefile
+++ b/client/go/Makefile
@@ -40,7 +40,7 @@ all: test checkfmt install
# $ git checkout vX.Y.Z
# $ make dist-homebrew
dist-homebrew: dist-version
- brew bump-formula-pr --version $(VERSION) vespa-cli
+ brew bump-formula-pr --version $(VERSION) --no-browse vespa-cli
# Create a GitHub release draft for all platforms. Note that this only creates a
# draft, which is not publicly visible until it's explicitly published.
diff --git a/client/go/cmd/api_key.go b/client/go/cmd/api_key.go
index 5e23cdc9ebd..592ab14f11f 100644
--- a/client/go/cmd/api_key.go
+++ b/client/go/cmd/api_key.go
@@ -28,13 +28,13 @@ key as necessary.
It's possible to override the API key used through environment variables. This
can be useful in continuous integration systems.
-* VESPA_CLI_API_KEY containing the key directly:
+Example of setting the key in-line:
- export VESPA_CLI_API_KEY="my api key"
+ export VESPA_CLI_API_KEY="my api key"
-* VESPA_CLI_API_KEY_FILE containing path to the key:
+Example of loading the key from a custom path:
- export VESPA_CLI_API_KEY_FILE=/path/to/api-key
+ export VESPA_CLI_API_KEY_FILE=/path/to/api-key
Note that when overriding API key through environment variables, that key will
always be used. It's not possible to specify a tenant-specific key.`,
diff --git a/client/go/cmd/cert.go b/client/go/cmd/cert.go
index caa32b0a963..11b20603ce8 100644
--- a/client/go/cmd/cert.go
+++ b/client/go/cmd/cert.go
@@ -36,13 +36,13 @@ environment variables. This can be useful in continuous integration systems.
Example of setting the certificate and key in-line:
-- export VESPA_CLI_DATA_PLANE_CERT="my cert"
-- export VESPA_CLI_DATA_PLANE_KEY="my private key"
+ export VESPA_CLI_DATA_PLANE_CERT="my cert"
+ export VESPA_CLI_DATA_PLANE_KEY="my private key"
Example of loading certificate and key from custom paths:
-- export VESPA_CLI_DATA_PLANE_CERT_FILE=/path/to/cert
-- export VESPA_CLI_DATA_PLANE_KEY_FILE=/path/to/key
+ export VESPA_CLI_DATA_PLANE_CERT_FILE=/path/to/cert
+ export VESPA_CLI_DATA_PLANE_KEY_FILE=/path/to/key
Note that when overriding key pair through environment variables, that key pair
will always be used for all applications. It's not possible to specify an
diff --git a/client/go/cmd/log_test.go b/client/go/cmd/log_test.go
index 4a6bd89c12d..fb08474dd4d 100644
--- a/client/go/cmd/log_test.go
+++ b/client/go/cmd/log_test.go
@@ -46,6 +46,6 @@ func TestLogOldClient(t *testing.T) {
assert.Nil(t, cli.Run("auth", "cert", pkgDir))
assert.Nil(t, cli.Run("log"))
- expected := "Error: client version 7.0.0 is less than the minimum supported version: 8.0.0\nHint: This is not a fatal error, but this version may not work as expected\nHint: Try 'vespa version' to check for a new version\n"
+ expected := "Warning: client version 7.0.0 is less than the minimum supported version: 8.0.0\nHint: This version may not work as expected\nHint: Try 'vespa version' to check for a new version\n"
assert.Contains(t, stderr.String(), expected)
}
diff --git a/client/go/cmd/root.go b/client/go/cmd/root.go
index 2dbc0e89e0f..d352bd2e822 100644
--- a/client/go/cmd/root.go
+++ b/client/go/cmd/root.go
@@ -136,7 +136,7 @@ Vespa documentation: https://docs.vespa.ai`,
httpClient: util.CreateClient(time.Second * 10),
exec: &execSubprocess{},
}
- cli.isTerminal = func() bool { return isTerminal(cli.Stdout) || isTerminal(cli.Stderr) }
+ cli.isTerminal = func() bool { return isTerminal(cli.Stdout) && isTerminal(cli.Stderr) }
cli.configureFlags()
if err := cli.loadConfig(); err != nil {
return nil, err
@@ -272,7 +272,7 @@ func (c *CLI) target(opts targetOptions) (vespa.Target, error) {
}
if !c.isCloudCI() { // Vespa Cloud always runs an up-to-date version
if err := target.CheckVersion(c.version); err != nil {
- c.printErrHint(err, "This is not a fatal error, but this version may not work as expected", "Try 'vespa version' to check for a new version")
+ c.printWarning(err.Error(), "This version may not work as expected", "Try 'vespa version' to check for a new version")
}
}
return target, nil