Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Commit 6fd4ea9

Browse files
author
Faris Huskovic
authored
Merge pull request #171 from cdr/faris/ch2022/hide-secrets-command
Hide secrets command
2 parents c2c21c0 + 35a1e4a commit 6fd4ea9

File tree

8 files changed

+14
-161
lines changed

8 files changed

+14
-161
lines changed

ci/integration/secrets_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
func TestSecrets(t *testing.T) {
1313
t.Parallel()
1414
run(t, "secrets-cli-tests", func(t *testing.T, ctx context.Context, c *tcli.ContainerRunner) {
15+
t.Skip()
1516
headlessLogin(ctx, t, c)
1617

1718
c.Run(ctx, "coder secrets ls").Assert(t,

docs/coder.md

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ coder provides a CLI for working with an existing Coder Enterprise installation
1616
* [coder envs](coder_envs.md) - Interact with Coder environments
1717
* [coder login](coder_login.md) - Authenticate this client for future operations
1818
* [coder logout](coder_logout.md) - Remove local authentication credentials if any exist
19-
* [coder secrets](coder_secrets.md) - Interact with Coder Secrets
2019
* [coder sh](coder_sh.md) - Open a shell and execute commands in a Coder environment
2120
* [coder sync](coder_sync.md) - Establish a one way directory sync to a Coder environment
2221
* [coder urls](coder_urls.md) - Interact with environment DevURLs

docs/coder_secrets.md

-29
This file was deleted.

docs/coder_secrets_create.md

-41
This file was deleted.

docs/coder_secrets_ls.md

-25
This file was deleted.

docs/coder_secrets_rm.md

-31
This file was deleted.

docs/coder_secrets_view.md

-31
This file was deleted.

internal/cmd/secrets.go

+13-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,19 @@ import (
1717
func secretsCmd() *cobra.Command {
1818
var user string
1919
cmd := &cobra.Command{
20-
Use: "secrets",
21-
Short: "Interact with Coder Secrets",
22-
Long: "Interact with secrets objects owned by the active user.",
20+
Use: "secrets",
21+
Short: "Interact with Coder Secrets",
22+
Long: "Interact with secrets objects owned by the active user.",
23+
Hidden: true,
24+
PersistentPreRun: func(cmd *cobra.Command, args []string) {
25+
clog.LogWarn(
26+
"The 'secrets' command is now deprecated",
27+
"It will be removed in the next minor release",
28+
)
29+
},
30+
Run: func(cmd *cobra.Command, args []string) {
31+
_ = cmd.Help()
32+
},
2333
}
2434
cmd.PersistentFlags().StringVar(&user, "user", coder.Me, "Specify the user whose resources to target")
2535
cmd.AddCommand(

0 commit comments

Comments
 (0)